fixed version conflict
This commit is contained in:
commit
0a0df2e433
@ -178,7 +178,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Allocated",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
|
@ -614,6 +614,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
this.child.batch_no = this.item_batch_no[this.child.item_code];
|
||||
this.child.serial_no = (this.item_serial_no[this.child.item_code]
|
||||
? this.item_serial_no[this.child.item_code][0] : '');
|
||||
this.child.item_tax_rate = this.items[0].taxes;
|
||||
},
|
||||
|
||||
update_paid_amount_status: function(update_paid_amount){
|
||||
|
@ -4,8 +4,10 @@ from erpnext.manufacturing.doctype.production_order.production_order \
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc('projects', 'doctype', 'timesheet')
|
||||
if not frappe.db.table_exists("Time Log"):
|
||||
return
|
||||
|
||||
for data in frappe.get_all('Time Log', fields=["*"], filters = [["docstatus", "<", "2"]]):
|
||||
for data in frappe.db.sql("select * from `tabTime Log` where where docstatus < 2", as_dict=1):
|
||||
if data.task:
|
||||
company = frappe.db.get_value("Task", data.task, "company")
|
||||
elif data.production_order:
|
||||
|
@ -4,11 +4,14 @@ import frappe
|
||||
def execute():
|
||||
frappe.reload_doc('accounts', 'doctype', 'sales_invoice_timesheet')
|
||||
frappe.reload_doc('accounts', 'doctype', 'sales_invoice_payment')
|
||||
frappe.reload_doc('accounts', 'doctype', 'mode_of_payment')
|
||||
|
||||
count = 0
|
||||
for data in frappe.db.sql("""select name, mode_of_payment, cash_bank_account, paid_amount, company
|
||||
from `tabSales Invoice`
|
||||
where is_pos = 1 and docstatus < 2
|
||||
and cash_bank_account is not null and cash_bank_account != ''""", as_dict=1):
|
||||
from `tabSales Invoice` si
|
||||
where si.is_pos = 1 and si.docstatus < 2
|
||||
and si.cash_bank_account is not null and si.cash_bank_account != ''
|
||||
and not exists(select name from `tabSales Invoice Payment` where parent=si.name)""", as_dict=1):
|
||||
|
||||
if not data.mode_of_payment and not frappe.db.exists("Mode of Payment", "Cash"):
|
||||
mop = frappe.new_doc("Mode of Payment")
|
||||
@ -17,13 +20,19 @@ def execute():
|
||||
mop.save()
|
||||
|
||||
si_doc = frappe.get_doc('Sales Invoice', data.name)
|
||||
si_doc.append('payments', {
|
||||
row = si_doc.append('payments', {
|
||||
'mode_of_payment': data.mode_of_payment or 'Cash',
|
||||
'account': data.cash_bank_account,
|
||||
'type': frappe.db.get_value('Mode of Payment', data.mode_of_payment, 'type') or 'Cash',
|
||||
'amount': data.paid_amount
|
||||
})
|
||||
row.db_update()
|
||||
|
||||
si_doc.set_paid_amount()
|
||||
si_doc.flags.ignore_validate_update_after_submit = True
|
||||
si_doc.save()
|
||||
si_doc.db_set("paid_amount", si_doc.paid_amount)
|
||||
si_doc.db_set("base_paid_amount", si_doc.base_paid_amount)
|
||||
|
||||
count +=1
|
||||
|
||||
if count % 200 == 0:
|
||||
frappe.db.commit()
|
Loading…
Reference in New Issue
Block a user