Shopify Integration Mode of Payment

Hi,

I have installed Shopify Connector and have troubling syncing paid orders to become a sales invoice.

Received the following error log. Please advice. I have already put the Bank Transfer as the mode of payment.

Traceback (most recent call last):
File “/home/ubuntu/frappe-bench/apps/erpnext_shopify/erpnext_shopify/sync_orders.py”, line 22, in sync_shopify_orders
create_order(shopify_order, shopify_settings)
File “/home/ubuntu/frappe-bench/apps/erpnext_shopify/erpnext_shopify/sync_orders.py”, line 54, in create_order
create_sales_invoice(shopify_order, shopify_settings, so)
File “/home/ubuntu/frappe-bench/apps/erpnext_shopify/erpnext_shopify/sync_orders.py”, line 100, in create_sales_invoice
si.submit()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 726, in submit
self._submit()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 715, in _submit
self.save()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 233, in save
return self._save(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 252, in save
self.insert()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 222, in insert
self.run_post_save_methods()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 774, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 654, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 882, in composer
return composed(self, method, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 865, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 648, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py”, line 95, in on_submit
self.validate_pos_paid_amount()
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py”, line 131, in validate_pos_paid_amount
frappe.throw(
(“At least one mode of payment is required for POS invoice.”))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 300, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 293, in msgprint
_raise_exception()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 266, in _raise_exception
raise raise_exception, encode(msg)
ValidationError: At least one mode of payment is required for POS invoice.

@mulyadi-agtechsg Thanks for reporting the issue. Will fix this asps.

Fixing via [fix] create payment entry if payment is marked in Shopify by saurabh6790 · Pull Request #132 · frappe/erpnext_shopify · GitHub

1 Like

Thanks!

Hi @saurabh6790,

While there is no error, there isn’t any Sales Invoice created. We updated to the latest Frappe and ERPNext.

Also, the following error now is:

Traceback (most recent call last):
File “/home/ubuntu/frappe-bench/apps/erpnext_shopify/erpnext_shopify/sync_orders.py”, line 22, in sync_shopify_orders
create_order(shopify_order, shopify_settings)
File “/home/ubuntu/frappe-bench/apps/erpnext_shopify/erpnext_shopify/sync_orders.py”, line 54, in create_order
create_sales_invoice(shopify_order, shopify_settings, so)
File “/home/ubuntu/frappe-bench/apps/erpnext_shopify/erpnext_shopify/sync_orders.py”, line 99, in create_sales_invoice
make_payament_entry_against_sales_invoice(si, shopify_settings)
File “/home/ubuntu/frappe-bench/apps/erpnext_shopify/erpnext_shopify/sync_orders.py”, line 106, in make_payament_entry_against_sales_invoice
payemnt_entry.submit()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 723, in submit
self._submit()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 712, in _submit
self.save()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 233, in save
return self._save(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 252, in save
self.insert()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 203, in insert
self.run_before_save_methods()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 753, in run_before_save_methods
self.run_method(“validate”)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 651, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 879, in composer
return composed(self, method, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 862, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 645, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py”, line 48, in validate
self.validate_transaction_reference()
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py”, line 323, in validate_transaction_reference
frappe.throw(
(“Reference No and Reference Date is mandatory for Bank transaction”))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 300, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 293, in msgprint
_raise_exception()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 266, in _raise_exception
raise raise_exception, encode(msg)
ValidationError: Reference No and Reference Date is mandatory for Bank transaction