mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
[auto inventory accounting] [fix] if non stock item, dont create gl entry in delivery note and pos sales invoice
This commit is contained in:
@@ -749,8 +749,9 @@ class DocType(SellingController):
|
|||||||
for item in self.doclist.get({"parentfield": "entries"}):
|
for item in self.doclist.get({"parentfield": "entries"}):
|
||||||
self.check_expense_account(item)
|
self.check_expense_account(item)
|
||||||
|
|
||||||
gl_entries += self.get_gl_entries_for_stock(item.expense_account,
|
if item.buying_amount:
|
||||||
-1*item.buying_amount, cost_center=item.cost_center)
|
gl_entries += self.get_gl_entries_for_stock(item.expense_account,
|
||||||
|
-1*item.buying_amount, cost_center=item.cost_center)
|
||||||
|
|
||||||
def make_pos_gl_entries(self, gl_entries):
|
def make_pos_gl_entries(self, gl_entries):
|
||||||
if cint(self.doc.is_pos) and self.doc.cash_bank_account and self.doc.paid_amount:
|
if cint(self.doc.is_pos) and self.doc.cash_bank_account and self.doc.paid_amount:
|
||||||
|
|||||||
@@ -413,8 +413,9 @@ class DocType(SellingController):
|
|||||||
for item in self.doclist.get({"parentfield": "delivery_note_details"}):
|
for item in self.doclist.get({"parentfield": "delivery_note_details"}):
|
||||||
self.check_expense_account(item)
|
self.check_expense_account(item)
|
||||||
|
|
||||||
gl_entries += self.get_gl_entries_for_stock(item.expense_account, -1*item.buying_amount,
|
if item.buying_amount:
|
||||||
cost_center=item.cost_center)
|
gl_entries += self.get_gl_entries_for_stock(item.expense_account, -1*item.buying_amount,
|
||||||
|
cost_center=item.cost_center)
|
||||||
|
|
||||||
if gl_entries:
|
if gl_entries:
|
||||||
from accounts.general_ledger import make_gl_entries
|
from accounts.general_ledger import make_gl_entries
|
||||||
|
|||||||
Reference in New Issue
Block a user