mirror of
https://github.com/frappe/books.git
synced 2024-12-22 19:09:01 +00:00
2bffcda8ff
When defining taxes, it is possible to define an additional payment account that will be used during payments to move taxes from the original tax account to this new payment tax account. This allows to account for taxes only when payment is received. Now payments can reference tax summary objects that will reference the two accounts to move funds between when the payment is committed. Reuse some of the Invoice code to generate these tax summary objects.
204 lines
4.3 KiB
JSON
204 lines
4.3 KiB
JSON
{
|
|
"name": "Payment",
|
|
"label": "Payment",
|
|
"naming": "numberSeries",
|
|
"isSingle": false,
|
|
"isChild": false,
|
|
"isSubmittable": true,
|
|
"fields": [
|
|
{
|
|
"label": "Payment No",
|
|
"fieldname": "name",
|
|
"fieldtype": "Data",
|
|
"required": true,
|
|
"readOnly": true,
|
|
"hidden": true
|
|
},
|
|
{
|
|
"fieldname": "numberSeries",
|
|
"label": "Number Series",
|
|
"fieldtype": "Link",
|
|
"target": "NumberSeries",
|
|
"create": true,
|
|
"required": true,
|
|
"default": "PAY-",
|
|
"section": "Default"
|
|
},
|
|
{
|
|
"fieldname": "party",
|
|
"label": "Party",
|
|
"fieldtype": "Link",
|
|
"target": "Party",
|
|
"create": true,
|
|
"required": true,
|
|
"section": "Default"
|
|
},
|
|
{
|
|
"fieldname": "date",
|
|
"label": "Posting Date",
|
|
"fieldtype": "Date",
|
|
"required": true,
|
|
"section": "Default"
|
|
},
|
|
{
|
|
"fieldname": "paymentType",
|
|
"label": "Payment Type",
|
|
"fieldtype": "Select",
|
|
"placeholder": "Payment Type",
|
|
"options": [
|
|
{
|
|
"value": "Receive",
|
|
"label": "Receive"
|
|
},
|
|
{
|
|
"value": "Pay",
|
|
"label": "Pay"
|
|
}
|
|
],
|
|
"required": true,
|
|
"section": "Default"
|
|
},
|
|
{
|
|
"fieldname": "account",
|
|
"label": "From Account",
|
|
"fieldtype": "Link",
|
|
"target": "Account",
|
|
"create": true,
|
|
"required": true,
|
|
"section": "Details"
|
|
},
|
|
{
|
|
"fieldname": "paymentAccount",
|
|
"label": "To Account",
|
|
"placeholder": "To Account",
|
|
"fieldtype": "Link",
|
|
"target": "Account",
|
|
"create": true,
|
|
"required": true,
|
|
"section": "Details"
|
|
},
|
|
{
|
|
"fieldname": "paymentMethod",
|
|
"label": "Payment Method",
|
|
"placeholder": "Payment Method",
|
|
"fieldtype": "Select",
|
|
"options": [
|
|
{
|
|
"value": "Cash",
|
|
"label": "Cash"
|
|
},
|
|
{
|
|
"value": "Cheque",
|
|
"label": "Cheque"
|
|
},
|
|
{
|
|
"value": "Transfer",
|
|
"label": "Transfer"
|
|
}
|
|
],
|
|
"default": "Cash",
|
|
"required": true,
|
|
"section": "Details"
|
|
},
|
|
{
|
|
"fieldname": "clearanceDate",
|
|
"label": "Clearance Date",
|
|
"placeholder": "Clearance Date",
|
|
"fieldtype": "Date",
|
|
"section": "Details"
|
|
},
|
|
{
|
|
"fieldname": "referenceId",
|
|
"label": "Ref. / Cheque No.",
|
|
"placeholder": "Ref. / Cheque No.",
|
|
"fieldtype": "Data",
|
|
"section": "Details"
|
|
},
|
|
{
|
|
"fieldname": "referenceDate",
|
|
"label": "Reference Date",
|
|
"placeholder": "Ref. Date",
|
|
"fieldtype": "Date",
|
|
"section": "Details"
|
|
},
|
|
{
|
|
"fieldname": "amount",
|
|
"label": "Amount",
|
|
"fieldtype": "Currency",
|
|
"required": true,
|
|
"section": "Amounts"
|
|
},
|
|
{
|
|
"fieldname": "writeoff",
|
|
"label": "Write Off",
|
|
"fieldtype": "Currency",
|
|
"section": "Amounts"
|
|
},
|
|
{
|
|
"fieldname": "amountPaid",
|
|
"label": "Amount Paid",
|
|
"fieldtype": "Currency",
|
|
"computed": true,
|
|
"section": "Amounts"
|
|
},
|
|
{
|
|
"fieldname": "taxes",
|
|
"label": "Taxes",
|
|
"fieldtype": "Table",
|
|
"target": "TaxSummary",
|
|
"readOnly": true,
|
|
"section": "Amounts"
|
|
},
|
|
{
|
|
"fieldname": "for",
|
|
"label": "Payment Reference",
|
|
"fieldtype": "Table",
|
|
"target": "PaymentFor",
|
|
"required": false,
|
|
"section": "References"
|
|
},
|
|
{
|
|
"fieldname": "attachment",
|
|
"placeholder": "Add attachment",
|
|
"label": "Attachment",
|
|
"fieldtype": "Attachment",
|
|
"section": "References"
|
|
},
|
|
{
|
|
"fieldname": "referenceType",
|
|
"label": "Type",
|
|
"placeholder": "Type",
|
|
"fieldtype": "Select",
|
|
"options": [
|
|
{
|
|
"value": "SalesInvoice",
|
|
"label": "Sales"
|
|
},
|
|
{
|
|
"value": "PurchaseInvoice",
|
|
"label": "Purchase"
|
|
}
|
|
],
|
|
"hidden": true
|
|
}
|
|
],
|
|
"quickEditFields": [
|
|
"numberSeries",
|
|
"party",
|
|
"date",
|
|
"paymentMethod",
|
|
"account",
|
|
"paymentType",
|
|
"paymentAccount",
|
|
"referenceId",
|
|
"referenceDate",
|
|
"clearanceDate",
|
|
"amount",
|
|
"writeoff",
|
|
"amountPaid",
|
|
"attachment",
|
|
"for"
|
|
],
|
|
"keywordFields": ["name", "party", "paymentType"]
|
|
}
|