2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 10:58:59 +00:00

refactor: pos shift & pos settings schemas

This commit is contained in:
akshayitzme 2023-08-22 12:06:16 +05:30 committed by akshayitzme
parent e4907165bb
commit 65018bd750
4 changed files with 32 additions and 47 deletions

View File

@ -4,20 +4,5 @@
"isSingle": true,
"isChild": false,
"isSubmittable": true,
"fields": [
{
"fieldname": "discountAfterTax",
"label": "Apply Discount After Tax",
"fieldtype": "Check",
"default": false,
"section": "Default"
},
{
"fieldname": "hideImages",
"label": "Hide Images",
"fieldtype": "Check",
"default": false,
"section": "Default"
}
]
"fields": []
}

View File

@ -7,50 +7,32 @@
"fieldname": "isShiftOpen",
"label": "Is POS Shift Open",
"fieldtype": "Check",
"default": false,
"section": "Defaults"
"default": false
},
{
"fieldname": "openingDate",
"label": "Opening Date",
"fieldtype": "Datetime",
"section": "Defaults"
"fieldtype": "Datetime"
},
{
"fieldname": "closingDate",
"label": "Closing Date",
"fieldtype": "Datetime",
"section": "Defaults"
"fieldtype": "Datetime"
},
{
"fieldname": "openingCashAmount",
"label": "Opening Cash Amount",
"fieldtype": "Currency",
"section": "Defaults"
},
{
"fieldname": "totalOpeningAmount",
"label": "Opening Amount",
"fieldtype": "Currency",
"section": "Defaults"
},
{
"fieldname": "openingCashInDenominations",
"fieldname": "openingCash",
"fieldtype": "Table",
"target": "OpeningCashInDenominations",
"section": "Defaults"
"target": "OpeningCash"
},
{
"fieldname": "closingCash",
"fieldtype": "Table",
"target": "ClosingCash"
},
{
"fieldname": "openingAmounts",
"fieldtype": "Table",
"target": "POSShiftOpeningAmounts",
"section": "Defaults"
},
{
"fieldname": "closingAmounts",
"fieldtype": "Table",
"target": "POSShiftClosingAmounts",
"section": "Defaults"
"target": "OpeningAmounts"
}
]
}

View File

@ -19,8 +19,7 @@
"label": "Transfer"
}
],
"required": true,
"section": "Details"
"required": true
}
]
}

View File

@ -52,6 +52,15 @@ import base from './meta/base.json';
import child from './meta/child.json';
import submittable from './meta/submittable.json';
import tree from './meta/tree.json';
import CashDenominations from './app/inventory/Point of Sale/CashDenominations.json';
import ClosingAmounts from './app/inventory/Point of Sale/ClosingAmounts.json';
import ClosingCash from './app/inventory/Point of Sale/ClosingCash.json';
import DefaultCashDenominations from './app/inventory/Point of Sale/DefaultCashDenominations.json';
import OpeningAmounts from './app/inventory/Point of Sale/OpeningAmounts.json';
import OpeningCash from './app/inventory/Point of Sale/OpeningCash.json';
import POSSettings from './app/inventory/Point of Sale/POSSettings.json';
import POSShift from './app/inventory/Point of Sale/POSShift.json';
import POSShiftAmounts from './app/inventory/Point of Sale/POSShiftAmounts.json';
import { Schema, SchemaStub } from './types';
export const coreSchemas: Schema[] = [
@ -129,4 +138,14 @@ export const appSchemas: Schema[] | SchemaStub[] = [
CustomForm as Schema,
CustomField as Schema,
CashDenominations as Schema,
ClosingAmounts as Schema,
ClosingCash as Schema,
DefaultCashDenominations as Schema,
OpeningAmounts as Schema,
OpeningCash as Schema,
POSSettings as Schema,
POSShift as Schema,
POSShiftAmounts as Schema,
];