This is the if.else error in the sales_invoice.py file… Can somebody please explain to me what’s the issue here and how to fix it?
# Set default warehouse from pos setting
#----------------------------------------
if cint(self.doc.is_pos) == 1:
self.set_actual_qty()
w = self.get_warehouse()
if w:
for d in getlist(self.doclist, 'entries'):
if not d.warehouse:
d.warehouse = cstr(w)
if flt(self.doc.paid_amount) == 0:
if self.doc.cash_bank_account:
webnotes.conn.set(self.doc, 'paid_amount',
(flt(self.doc.grand_total) - flt(self.doc.write_off_amount)))
else:
# show message that the amount is not paid
webnotes.conn.set(self.doc,'paid_amount',0)
webnotes.msgprint("Note: Payment Entry not created since 'Cash/Bank Account' was not specified.")
This pop up error shows up whenever I try to make any sales invoice, sales order, quotation or pretty much everything that involves selecting a product. I’m not sure where to look for the error trace exactly, but I can definitely check find it if you just show me where to look.
To clarify, there’s no error showing up in the error snapshots menu, it’s just a pop up notification. I think if we knew why the prices are not reflected and showing as zeros, that should fix it.
With that said, I already checked the mode of payment, cash/credit bank and both are selected correctly.
When I select any item to sell or purchase, its price doesn’t get reflected, instead, it shows as zeros and I have to manually change the price. When I hit save the sales or purchase or whatever order I’m in, a notification shows up at the top of the page saying “Note: Payment Entry not created since ‘Cash/Bank Account’ was not specified”…
I searched for this error within the whole code and the only place i could find it is in sales_invoice.py module which i pasted here…
@nabinhait No I’m not using v4, I’m using the latest version… I just searched for the popup error that I get and only found it in the above py module, hence posted it.