2
0
mirror of https://github.com/frappe/books.git synced 2024-11-09 23:30:56 +00:00

feat: pos schemas

This commit is contained in:
akshayitzme 2023-08-16 17:50:57 +05:30 committed by akshayitzme
parent 74a81defdf
commit 22b32cbc41
10 changed files with 246 additions and 0 deletions

View File

@ -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"
}
]
}

View File

@ -63,6 +63,13 @@
"fieldtype": "Check",
"default": false,
"section": "Features"
},
{
"fieldname": "enablePointOfSale",
"label": "Enable Point of Sale",
"fieldtype": "Check",
"default": false,
"section": "Features"
}
]
}

View File

@ -0,0 +1,14 @@
{
"name": "CashDenominations",
"label": "Cash Denominations",
"isAbstract": true,
"fields": [
{
"fieldname": "denomination",
"fieldtype": "Currency",
"label": "Denomination",
"placeholder": "Denomination",
"required": true
}
]
}

View File

@ -0,0 +1,7 @@
{
"name": "DefaultCashDenominations",
"label": "Default Cash Denominations",
"isChild": true,
"extends": "CashDenominations",
"tableFields": ["denomination"]
}

View File

@ -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"]
}

View File

@ -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"
}
]
}

View File

@ -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"
}
]
}

View File

@ -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"
}
]
}

View File

@ -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"
]
}

View File

@ -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"]
}