Merge branch 'develop' into manufacturing-work-order-closed
This commit is contained in:
commit
3d012ad31d
@ -342,7 +342,15 @@ def get_pe_matching_query(amount_condition, account_from_to, transaction):
|
||||
|
||||
def get_je_matching_query(amount_condition, transaction):
|
||||
# get matching journal entry query
|
||||
cr_or_dr = "credit" if transaction.withdrawal > 0 else "debit"
|
||||
|
||||
company_account = frappe.get_value("Bank Account", transaction.bank_account, "account")
|
||||
root_type = frappe.get_value("Account", company_account, "root_type")
|
||||
|
||||
if root_type == "Liability":
|
||||
cr_or_dr = "debit" if transaction.withdrawal > 0 else "credit"
|
||||
else:
|
||||
cr_or_dr = "credit" if transaction.withdrawal > 0 else "debit"
|
||||
|
||||
return f"""
|
||||
|
||||
SELECT
|
||||
|
@ -2029,7 +2029,7 @@ def get_mode_of_payments_info(mode_of_payments, company):
|
||||
mpa.parent = mp.name and
|
||||
mpa.company = %s and
|
||||
mp.enabled = 1 and
|
||||
mp.name in (%s)
|
||||
mp.name in %s
|
||||
group by
|
||||
mp.name
|
||||
""", (company, mode_of_payments), as_dict=1)
|
||||
|
@ -31,6 +31,9 @@ class RepostItemValuation(Document):
|
||||
self.voucher_type = None
|
||||
self.voucher_no = None
|
||||
|
||||
self.allow_negative_stock = self.allow_negative_stock or \
|
||||
cint(frappe.db.get_single_value("Stock Settings", "allow_negative_stock"))
|
||||
|
||||
def set_company(self):
|
||||
if self.voucher_type and self.voucher_no:
|
||||
self.company = frappe.get_cached_value(self.voucher_type, self.voucher_no, "company")
|
||||
|
@ -46,7 +46,7 @@ def get_incorrect_data(data):
|
||||
return row
|
||||
|
||||
def get_stock_ledger_entries(report_filters):
|
||||
filters = {}
|
||||
filters = {"is_cancelled": 0}
|
||||
fields = ['name', 'voucher_type', 'voucher_no', 'item_code', 'actual_qty',
|
||||
'posting_date', 'posting_time', 'company', 'warehouse', 'qty_after_transaction', 'batch_no']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user