From d4ee09f31f2f907734b660c7a4fb3377512ab711 Mon Sep 17 00:00:00 2001 From: akshayitzme Date: Wed, 16 Aug 2023 17:50:57 +0530 Subject: [PATCH] feat: pos schemas --- schemas/app/Defaults.json | 38 +++++++++++++ schemas/app/inventory/InventorySettings.json | 7 +++ .../Point of Sale/CashDenominations.json | 14 +++++ .../DefaultCashDenominations.json | 7 +++ .../OpeningCashInDenominations.json | 17 ++++++ .../inventory/Point of Sale/POSSettings.json | 23 ++++++++ .../app/inventory/Point of Sale/POSShift.json | 56 +++++++++++++++++++ .../Point of Sale/POSShiftAmounts.json | 27 +++++++++ .../Point of Sale/POSShiftClosingAmounts.json | 42 ++++++++++++++ .../Point of Sale/POSShiftOpeningAmounts.json | 15 +++++ 10 files changed, 246 insertions(+) create mode 100644 schemas/app/inventory/Point of Sale/CashDenominations.json create mode 100644 schemas/app/inventory/Point of Sale/DefaultCashDenominations.json create mode 100644 schemas/app/inventory/Point of Sale/OpeningCashInDenominations.json create mode 100644 schemas/app/inventory/Point of Sale/POSSettings.json create mode 100644 schemas/app/inventory/Point of Sale/POSShift.json create mode 100644 schemas/app/inventory/Point of Sale/POSShiftAmounts.json create mode 100644 schemas/app/inventory/Point of Sale/POSShiftClosingAmounts.json create mode 100644 schemas/app/inventory/Point of Sale/POSShiftOpeningAmounts.json diff --git a/schemas/app/Defaults.json b/schemas/app/Defaults.json index 9b5e5c3d8..bf47f7de4 100644 --- a/schemas/app/Defaults.json +++ b/schemas/app/Defaults.json @@ -164,6 +164,44 @@ "fieldtype": "Link", "target": "PrintTemplate", "section": "Print Templates" + }, + { + "fieldname": "posCustomer", + "label": "POS Customer", + "fieldtype": "Link", + "target": "Party", + "section": "Point of Sale" + }, + { + "fieldname": "posInventory", + "label": "Inventory", + "fieldtype": "Link", + "target": "Location", + "default": "Stores", + "section": "Point of Sale" + }, + { + "fieldname": "posPrintTemplate", + "label": "Print Template", + "fieldtype": "Link", + "target": "PrintTemplate", + "default": "Minimal - Sales Invoice", + "section": "Point of Sale" + }, + { + "fieldname": "posAdjustmentAccount", + "label": "Adjustment Account", + "fieldtype": "Link", + "target": "Account", + "default": "Write Off", + "section": "Point of Sale" + }, + { + "fieldname": "posCashDenominations", + "label": "Cash Denominations", + "fieldtype": "Table", + "target": "DefaultCashDenominations", + "section": "Point of Sale" } ] } diff --git a/schemas/app/inventory/InventorySettings.json b/schemas/app/inventory/InventorySettings.json index d0c6461c4..d29dc66a2 100644 --- a/schemas/app/inventory/InventorySettings.json +++ b/schemas/app/inventory/InventorySettings.json @@ -81,6 +81,13 @@ "fieldtype": "Check", "default": false, "section": "Features" + }, + { + "fieldname": "enablePointOfSale", + "label": "Enable Point of Sale", + "fieldtype": "Check", + "default": false, + "section": "Features" } ] } diff --git a/schemas/app/inventory/Point of Sale/CashDenominations.json b/schemas/app/inventory/Point of Sale/CashDenominations.json new file mode 100644 index 000000000..fac35407a --- /dev/null +++ b/schemas/app/inventory/Point of Sale/CashDenominations.json @@ -0,0 +1,14 @@ +{ + "name": "CashDenominations", + "label": "Cash Denominations", + "isAbstract": true, + "fields": [ + { + "fieldname": "denomination", + "fieldtype": "Currency", + "label": "Denomination", + "placeholder": "Denomination", + "required": true + } + ] +} diff --git a/schemas/app/inventory/Point of Sale/DefaultCashDenominations.json b/schemas/app/inventory/Point of Sale/DefaultCashDenominations.json new file mode 100644 index 000000000..971992d9c --- /dev/null +++ b/schemas/app/inventory/Point of Sale/DefaultCashDenominations.json @@ -0,0 +1,7 @@ +{ + "name": "DefaultCashDenominations", + "label": "Default Cash Denominations", + "isChild": true, + "extends": "CashDenominations", + "tableFields": ["denomination"] +} diff --git a/schemas/app/inventory/Point of Sale/OpeningCashInDenominations.json b/schemas/app/inventory/Point of Sale/OpeningCashInDenominations.json new file mode 100644 index 000000000..fa9e22975 --- /dev/null +++ b/schemas/app/inventory/Point of Sale/OpeningCashInDenominations.json @@ -0,0 +1,17 @@ +{ + "name": "OpeningCashInDenominations", + "label": "Opening Cash In Denominations", + "isChild": true, + "extends": "CashDenominations", + "fields": [ + { + "fieldname": "count", + "label": "Count", + "placeholder": "Count", + "fieldtype": "Int", + "default": 0, + "required": true + } + ], + "tableFields": ["denomination", "count"] +} diff --git a/schemas/app/inventory/Point of Sale/POSSettings.json b/schemas/app/inventory/Point of Sale/POSSettings.json new file mode 100644 index 000000000..78d57674c --- /dev/null +++ b/schemas/app/inventory/Point of Sale/POSSettings.json @@ -0,0 +1,23 @@ +{ + "name": "POSSettings", + "label": "POS Settings", + "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" + } + ] +} diff --git a/schemas/app/inventory/Point of Sale/POSShift.json b/schemas/app/inventory/Point of Sale/POSShift.json new file mode 100644 index 000000000..ea878e213 --- /dev/null +++ b/schemas/app/inventory/Point of Sale/POSShift.json @@ -0,0 +1,56 @@ +{ + "name": "POSShift", + "isSingle": true, + "isChild": false, + "fields": [ + { + "fieldname": "isShiftOpen", + "label": "Is POS Shift Open", + "fieldtype": "Check", + "default": false, + "section": "Defaults" + }, + { + "fieldname": "openingDate", + "label": "Opening Date", + "fieldtype": "Datetime", + "section": "Defaults" + }, + { + "fieldname": "closingDate", + "label": "Closing Date", + "fieldtype": "Datetime", + "section": "Defaults" + }, + { + "fieldname": "openingCashAmount", + "label": "Opening Cash Amount", + "fieldtype": "Currency", + "section": "Defaults" + }, + { + "fieldname": "totalOpeningAmount", + "label": "Opening Amount", + "fieldtype": "Currency", + "section": "Defaults" + }, + { + "fieldname": "openingCashInDenominations", + "fieldtype": "Table", + "target": "OpeningCashInDenominations", + "section": "Defaults" + }, + { + "fieldname": "openingAmounts", + "fieldtype": "Table", + "target": "POSShiftOpeningAmounts", + "section": "Defaults" + }, + { + "fieldname": "closingAmounts", + "fieldtype": "Table", + "target": "POSShiftClosingAmounts", + "section": "Defaults" + } + ] +} diff --git a/schemas/app/inventory/Point of Sale/POSShiftAmounts.json b/schemas/app/inventory/Point of Sale/POSShiftAmounts.json new file mode 100644 index 000000000..031723af3 --- /dev/null +++ b/schemas/app/inventory/Point of Sale/POSShiftAmounts.json @@ -0,0 +1,27 @@ +{ + "name": "POSShiftAmounts", + "label": "POS Shift Amount", + "isChild": true, + "isAbstract": true, + "fields": [ + { + "fieldname": "paymentMethod", + "label": "Payment Method", + "placeholder": "Payment Method", + "fieldtype": "Select", + "options": [ + { + "value": "Cash", + "label": "Cash" + }, + { + "value": "Transfer", + "label": "Transfer" + } + ], + "required": true, + "section": "Details" + } + ] + } + \ No newline at end of file diff --git a/schemas/app/inventory/Point of Sale/POSShiftClosingAmounts.json b/schemas/app/inventory/Point of Sale/POSShiftClosingAmounts.json new file mode 100644 index 000000000..3f3587b95 --- /dev/null +++ b/schemas/app/inventory/Point of Sale/POSShiftClosingAmounts.json @@ -0,0 +1,42 @@ +{ + "name": "POSShiftClosingAmounts", + "label": "Opening Amount", + "isChild": true, + "extends": "POSShiftAmounts", + "fields": [ + { + "fieldname": "openingAmount", + "fieldtype": "Currency", + "label": "Opening Amount", + "placeholder": "Opening Amount", + "readOnly": true + }, + { + "fieldname": "closingAmount", + "fieldtype": "Currency", + "label": "Closing Amount", + "placeholder": "Closing Amount" + }, + { + "fieldname": "expectedAmount", + "fieldtype": "Currency", + "label": "Expected Amount", + "placeholder": "Expected Amount", + "readOnly": true + }, + { + "fieldname": "differenceAmount", + "fieldtype": "Currency", + "label": "Difference Amount", + "placeholder": "Difference Amount", + "readOnly": true + } + ], + "tableFields": [ + "paymentMethod", + "openingAmount", + "closingAmount", + "expectedAmount", + "differenceAmount" + ] +} diff --git a/schemas/app/inventory/Point of Sale/POSShiftOpeningAmounts.json b/schemas/app/inventory/Point of Sale/POSShiftOpeningAmounts.json new file mode 100644 index 000000000..ec77e73e8 --- /dev/null +++ b/schemas/app/inventory/Point of Sale/POSShiftOpeningAmounts.json @@ -0,0 +1,15 @@ +{ + "name": "POSShiftOpeningAmounts", + "label": "Opening Amount", + "isChild": true, + "extends": "POSShiftAmounts", + "fields": [ + { + "fieldname": "amount", + "label": "Amount", + "fieldtype": "Currency", + "section": "Defaults" + } + ], + "tableFields": ["paymentMethod", "amount"] +}