From bf86953b4c1f0f84cccf3dea10a7858ba9b595f9 Mon Sep 17 00:00:00 2001 From: Bassam Ramadan Date: Thu, 8 Nov 2018 08:56:24 +0200 Subject: [PATCH] adding returns field to cashier closing (#15752) * adding returns field to cashier closing * Update cashier_closing.json --- .../cashier_closing/cashier_closing.json | 39 +++++++++++++++++-- .../cashier_closing/cashier_closing.py | 2 +- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/cashier_closing/cashier_closing.json b/erpnext/accounts/doctype/cashier_closing/cashier_closing.json index 57a9c7aadd..46c3d19cf1 100644 --- a/erpnext/accounts/doctype/cashier_closing/cashier_closing.json +++ b/erpnext/accounts/doctype/cashier_closing/cashier_closing.json @@ -19,7 +19,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "default": "Cashier-closing-", + "default": "POS-CLO-", "fieldname": "naming_series", "fieldtype": "Select", "hidden": 0, @@ -32,7 +32,7 @@ "label": "Series", "length": 0, "no_copy": 0, - "options": "Cashier-closing-\n", + "options": "POS-CLO-", "permlevel": 0, "precision": "", "print_hide": 0, @@ -230,6 +230,37 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0.00", + "fieldname": "returns", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 1, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Returns", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "2", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -364,7 +395,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-09-03 10:59:54.500567", + "modified": "2018-10-21 14:26:15.812416", "modified_by": "Administrator", "module": "Accounts", "name": "Cashier Closing", @@ -400,4 +431,4 @@ "sort_order": "DESC", "track_changes": 1, "track_seen": 0 -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/cashier_closing/cashier_closing.py b/erpnext/accounts/doctype/cashier_closing/cashier_closing.py index 906bc7f18a..f33b3e1968 100644 --- a/erpnext/accounts/doctype/cashier_closing/cashier_closing.py +++ b/erpnext/accounts/doctype/cashier_closing/cashier_closing.py @@ -29,7 +29,7 @@ class CashierClosing(Document): for i in self.payments: total += flt(i.amount) - self.net_amount = total + self.outstanding_amount + self.expense - self.custody + self.net_amount = total + self.outstanding_amount + self.expense - self.custody + self.returns def validate_time(self): if self.from_time >= self.time: