Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
71d7c70497
@ -7,8 +7,10 @@ from accounts.report.accounts_receivable.accounts_receivable import get_ageing_d
|
|||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
if not filters: filters = {}
|
if not filters: filters = {}
|
||||||
columns = get_columns()
|
columns = get_columns()
|
||||||
|
|
||||||
entries = get_gl_entries(filters)
|
entries = get_gl_entries(filters)
|
||||||
|
account_supplier = dict(webnotes.conn.sql("""select account.name, supplier.supplier_name
|
||||||
|
from `tabAccount` account, `tabSupplier` supplier
|
||||||
|
where account.master_type="Supplier" and supplier.name=account.master_name"""))
|
||||||
|
|
||||||
entries_after_report_date = [[gle.voucher_type, gle.voucher_no]
|
entries_after_report_date = [[gle.voucher_type, gle.voucher_no]
|
||||||
for gle in get_gl_entries(filters, before_report_date=False)]
|
for gle in get_gl_entries(filters, before_report_date=False)]
|
||||||
@ -38,7 +40,8 @@ def execute(filters=None):
|
|||||||
|
|
||||||
if abs(flt(outstanding_amount)) > 0.01:
|
if abs(flt(outstanding_amount)) > 0.01:
|
||||||
paid_amount = invoiced_amount - outstanding_amount
|
paid_amount = invoiced_amount - outstanding_amount
|
||||||
row = [gle.posting_date, gle.account, gle.voucher_type, gle.voucher_no,
|
row = [gle.posting_date, gle.account, account_supplier.get(gle.account, ""),
|
||||||
|
gle.voucher_type, gle.voucher_no,
|
||||||
gle.remarks, account_supplier_type_map.get(gle.account), due_date, bill_no,
|
gle.remarks, account_supplier_type_map.get(gle.account), due_date, bill_no,
|
||||||
bill_date, invoiced_amount, paid_amount, outstanding_amount]
|
bill_date, invoiced_amount, paid_amount, outstanding_amount]
|
||||||
|
|
||||||
@ -55,7 +58,7 @@ def execute(filters=None):
|
|||||||
|
|
||||||
def get_columns():
|
def get_columns():
|
||||||
return [
|
return [
|
||||||
"Posting Date:Date:80", "Account:Link/Account:150", "Voucher Type::110",
|
"Posting Date:Date:80", "Account:Link/Account:150", "Supplier::150", "Voucher Type::110",
|
||||||
"Voucher No::120", "Remarks::150", "Supplier Type:Link/Supplier Type:120",
|
"Voucher No::120", "Remarks::150", "Supplier Type:Link/Supplier Type:120",
|
||||||
"Due Date:Date:80", "Bill No::80", "Bill Date:Date:80",
|
"Due Date:Date:80", "Bill No::80", "Bill Date:Date:80",
|
||||||
"Invoiced Amount:Currency:100", "Paid Amount:Currency:100",
|
"Invoiced Amount:Currency:100", "Paid Amount:Currency:100",
|
||||||
|
@ -7,6 +7,9 @@ def execute(filters=None):
|
|||||||
if not filters: filters = {}
|
if not filters: filters = {}
|
||||||
columns = get_columns()
|
columns = get_columns()
|
||||||
entries = get_gl_entries(filters)
|
entries = get_gl_entries(filters)
|
||||||
|
account_customer = dict(webnotes.conn.sql("""select account.name, customer.customer_name
|
||||||
|
from `tabAccount` account, `tabCustomer` customer
|
||||||
|
where account.master_type="Customer" and customer.name=account.master_name"""))
|
||||||
|
|
||||||
entries_after_report_date = [[gle.voucher_type, gle.voucher_no]
|
entries_after_report_date = [[gle.voucher_type, gle.voucher_no]
|
||||||
for gle in get_gl_entries(filters, upto_report_date=False)]
|
for gle in get_gl_entries(filters, upto_report_date=False)]
|
||||||
@ -32,7 +35,8 @@ def execute(filters=None):
|
|||||||
|
|
||||||
if abs(flt(outstanding_amount)) > 0.01:
|
if abs(flt(outstanding_amount)) > 0.01:
|
||||||
payment_amount = invoiced_amount - outstanding_amount
|
payment_amount = invoiced_amount - outstanding_amount
|
||||||
row = [gle.posting_date, gle.account, gle.voucher_type, gle.voucher_no,
|
row = [gle.posting_date, gle.account, account_customer.get(gle.account, ""),
|
||||||
|
gle.voucher_type, gle.voucher_no,
|
||||||
gle.remarks, due_date, account_territory_map.get(gle.account),
|
gle.remarks, due_date, account_territory_map.get(gle.account),
|
||||||
invoiced_amount, payment_amount, outstanding_amount]
|
invoiced_amount, payment_amount, outstanding_amount]
|
||||||
# Ageing
|
# Ageing
|
||||||
@ -48,7 +52,7 @@ def execute(filters=None):
|
|||||||
|
|
||||||
def get_columns():
|
def get_columns():
|
||||||
return [
|
return [
|
||||||
"Posting Date:Date:80", "Account:Link/Account:150", "Voucher Type::110",
|
"Posting Date:Date:80", "Account:Link/Account:150", "Customer::150", "Voucher Type::110",
|
||||||
"Voucher No::120", "Remarks::150", "Due Date:Date:80", "Territory:Link/Territory:80",
|
"Voucher No::120", "Remarks::150", "Due Date:Date:80", "Territory:Link/Territory:80",
|
||||||
"Invoiced Amount:Currency:100", "Payment Received:Currency:100",
|
"Invoiced Amount:Currency:100", "Payment Received:Currency:100",
|
||||||
"Outstanding Amount:Currency:100", "Age:Int:50", "0-30:Currency:100",
|
"Outstanding Amount:Currency:100", "Age:Int:50", "0-30:Currency:100",
|
||||||
|
@ -166,7 +166,7 @@ class DocType(SellingController):
|
|||||||
super(DocType, self).validate_with_previous_doc(self.tname, {
|
super(DocType, self).validate_with_previous_doc(self.tname, {
|
||||||
"Quotation": {
|
"Quotation": {
|
||||||
"ref_dn_field": "prevdoc_docname",
|
"ref_dn_field": "prevdoc_docname",
|
||||||
"compare_fields": [["customer", "="], ["company", "="], ["currency", "="]]
|
"compare_fields": [["company", "="], ["currency", "="]]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -62,9 +62,9 @@ function SMSManager() {
|
|||||||
var btn = d.fields_dict.send.input;
|
var btn = d.fields_dict.send.input;
|
||||||
var v = me.dialog.get_values();
|
var v = me.dialog.get_values();
|
||||||
if(v) {
|
if(v) {
|
||||||
btn.set_working();
|
$(this).set_working();
|
||||||
$c_obj('SMS Control', 'send_form_sms', v, function(r,rt) {
|
$c_obj('SMS Control', 'send_form_sms', v, function(r,rt) {
|
||||||
btn.done_working();
|
$(this).done_working();
|
||||||
if(r.exc) {msgprint(r.exc); return; }
|
if(r.exc) {msgprint(r.exc); return; }
|
||||||
msgprint('Message Sent');
|
msgprint('Message Sent');
|
||||||
me.dialog.hide();
|
me.dialog.hide();
|
||||||
|
@ -396,7 +396,9 @@ def map_party_contact_details(contact_name=None, party_field=None, party_name=No
|
|||||||
if not contact_name and party_field:
|
if not contact_name and party_field:
|
||||||
contact_name = get_default_contact(party_field, party_name)
|
contact_name = get_default_contact(party_field, party_name)
|
||||||
|
|
||||||
contact = webnotes.conn.sql("""select * from `tabContact` where name=%s""", contact_name, as_dict=True)
|
if contact_name:
|
||||||
|
contact = webnotes.conn.sql("""select * from `tabContact` where name=%s""",
|
||||||
|
contact_name, as_dict=True)
|
||||||
|
|
||||||
if contact:
|
if contact:
|
||||||
contact = contact[0]
|
contact = contact[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user