diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 45973fa1206..b1eeab9e6f8 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -766,7 +766,7 @@ def validate_against_pcv(is_opening, posting_date, company): ) last_pcv_date = frappe.db.get_value( - "Period Closing Voucher", {"docstatus": 1, "company": company}, {"MAX": "period_end_date"} + "Period Closing Voucher", {"docstatus": 1, "company": company}, [{"MAX": "period_end_date"}] ) if last_pcv_date and getdate(posting_date) <= getdate(last_pcv_date): diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py index afd596aa2a8..c30645f8827 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.py +++ b/erpnext/stock/doctype/packing_slip/packing_slip.py @@ -174,7 +174,7 @@ class PackingSlip(StatusUpdater): return ( cint( frappe.db.get_value( - "Packing Slip", {"delivery_note": self.delivery_note, "docstatus": 1}, {"MAX": "to_case_no"} + "Packing Slip", {"delivery_note": self.delivery_note, "docstatus": 1}, [{"MAX": "to_case_no"}] ) ) + 1