mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
fix(pos): multiple pos fixes and additions (#24227)
* fix: make custom fields in pos invoice similar to sales invoice * feat: allow/disallow rate & discount change * fix: any pos profile can be selected while creating pos opening * fix: cannot add item to cart * fix: validate phone payment only if payment request exists * fix: replace pos payment method patch * chore: rearrange item & customer group filter * fix: allow/disallow invoice level discount * fix: updating qty of item with uom having space char * fix: move configuration checbox to config section * fix: invalid item rate trigger * fix: cannot remove item from draft invoices * fix: customer currency not set in pos invoice * fix: duplicate item error message * fix: sales uom not fetched in pos invoice * fix: cannot add taxes to pos invoice for uae region * fix: cannot merge pos invoice into credit note * fix: tax calculation while merging pos invoices * feat: delete draft orders from order list * fix: merging of pos invoice with pricing rules
This commit is contained in:
@@ -44,6 +44,7 @@ class TestMpesaSettings(unittest.TestCase):
|
||||
create_mpesa_settings(payment_gateway_name="Payment")
|
||||
mpesa_account = frappe.db.get_value("Payment Gateway Account", {"payment_gateway": 'Mpesa-Payment'}, "payment_account")
|
||||
frappe.db.set_value("Account", mpesa_account, "account_currency", "KES")
|
||||
frappe.db.set_value("Customer", "_Test Customer", "default_currency", "KES")
|
||||
|
||||
pos_invoice = create_pos_invoice(do_not_submit=1)
|
||||
pos_invoice.append("payments", {'mode_of_payment': 'Mpesa-Payment', 'account': mpesa_account, 'amount': 500})
|
||||
@@ -69,6 +70,8 @@ class TestMpesaSettings(unittest.TestCase):
|
||||
self.assertEquals(pos_invoice.mpesa_receipt_number, "LGR7OWQX0R")
|
||||
self.assertEquals(integration_request.status, "Completed")
|
||||
|
||||
frappe.db.set_value("Customer", "_Test Customer", "default_currency", "")
|
||||
|
||||
def create_mpesa_settings(payment_gateway_name="Express"):
|
||||
if frappe.db.exists("Mpesa Settings", payment_gateway_name):
|
||||
return frappe.get_doc("Mpesa Settings", payment_gateway_name)
|
||||
|
||||
Reference in New Issue
Block a user