mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
Merge branch 'develop' into manufacturing-work-order-closed
This commit is contained in:
@@ -342,7 +342,15 @@ def get_pe_matching_query(amount_condition, account_from_to, transaction):
|
|||||||
|
|
||||||
def get_je_matching_query(amount_condition, transaction):
|
def get_je_matching_query(amount_condition, transaction):
|
||||||
# get matching journal entry query
|
# 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"""
|
return f"""
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
|||||||
@@ -2029,7 +2029,7 @@ def get_mode_of_payments_info(mode_of_payments, company):
|
|||||||
mpa.parent = mp.name and
|
mpa.parent = mp.name and
|
||||||
mpa.company = %s and
|
mpa.company = %s and
|
||||||
mp.enabled = 1 and
|
mp.enabled = 1 and
|
||||||
mp.name in (%s)
|
mp.name in %s
|
||||||
group by
|
group by
|
||||||
mp.name
|
mp.name
|
||||||
""", (company, mode_of_payments), as_dict=1)
|
""", (company, mode_of_payments), as_dict=1)
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ class RepostItemValuation(Document):
|
|||||||
self.voucher_type = None
|
self.voucher_type = None
|
||||||
self.voucher_no = 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):
|
def set_company(self):
|
||||||
if self.voucher_type and self.voucher_no:
|
if self.voucher_type and self.voucher_no:
|
||||||
self.company = frappe.get_cached_value(self.voucher_type, self.voucher_no, "company")
|
self.company = frappe.get_cached_value(self.voucher_type, self.voucher_no, "company")
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ def get_incorrect_data(data):
|
|||||||
return row
|
return row
|
||||||
|
|
||||||
def get_stock_ledger_entries(report_filters):
|
def get_stock_ledger_entries(report_filters):
|
||||||
filters = {}
|
filters = {"is_cancelled": 0}
|
||||||
fields = ['name', 'voucher_type', 'voucher_no', 'item_code', 'actual_qty',
|
fields = ['name', 'voucher_type', 'voucher_no', 'item_code', 'actual_qty',
|
||||||
'posting_date', 'posting_time', 'company', 'warehouse', 'qty_after_transaction', 'batch_no']
|
'posting_date', 'posting_time', 'company', 'warehouse', 'qty_after_transaction', 'batch_no']
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user