mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
deleted server side code from itemwise sales register report
This commit is contained in:
@@ -1,26 +0,0 @@
|
|||||||
#adding columns
|
|
||||||
cl = [c[0] for c in sql("select distinct account_head from `tabRV Tax Detail` where parenttype='Receivable Voucher' and docstatus=1 order by idx asc")]
|
|
||||||
|
|
||||||
cl+=['Total Tax', 'Grand Total']
|
|
||||||
for c in cl:
|
|
||||||
colnames.append(c)
|
|
||||||
coltypes.append('Currency')
|
|
||||||
colwidths.append('100px')
|
|
||||||
coloptions.append('')
|
|
||||||
|
|
||||||
cl = cl[:-2]
|
|
||||||
for r in res:
|
|
||||||
total_tax = 0
|
|
||||||
qty = flt(r[col_idx['Qty']] or 0)
|
|
||||||
amt = flt(r[col_idx['Amount*']] or 0)
|
|
||||||
for c in cl:
|
|
||||||
val = sql("select t1.tax_amount, t2.net_total from `tabRV Tax Detail` t1, `tabReceivable Voucher` t2 where t2.name = %s and t1.parent = %s and t1.parenttype='Receivable Voucher' and t1.account_head = %s", (r[col_idx['ID']],r[col_idx['ID']], c))
|
|
||||||
tax = val and flt(val[0][0]) or 0
|
|
||||||
net_total = val and flt(val[0][1]) or 0
|
|
||||||
if tax != 0:
|
|
||||||
tax = amt*tax/net_total
|
|
||||||
total_tax += tax
|
|
||||||
|
|
||||||
r.append(tax)
|
|
||||||
r.append(total_tax)
|
|
||||||
r.append(amt + total_tax)
|
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
'add_col': None,
|
'add_col': None,
|
||||||
'add_cond': None,
|
'add_cond': None,
|
||||||
'add_tab': None,
|
'add_tab': None,
|
||||||
'columns': 'RV Detail\x01Item,RV Detail\x01Item Name,RV Detail\x01Item Group,Receivable Voucher\x01ID,Receivable Voucher\x01Voucher Date,Receivable Voucher\x01Posting Date,Receivable Voucher\x01Debit To,RV Detail\x01Cost Center,Receivable Voucher\x01Territory,RV Detail\x01Qty,RV Detail\x01Basic Rate*,RV Detail\x01Amount*',
|
'columns': 'RV Detail\x01Item,RV Detail\x01Item Name,RV Detail\x01Item Group,Receivable Voucher\x01ID,Receivable Voucher\x01Voucher Date,Receivable Voucher\x01Posting Date,Receivable Voucher\x01Debit To,RV Detail\x01Cost Center,Receivable Voucher\x01Territory,RV Detail\x01Income Account,RV Detail\x01Qty,RV Detail\x01Basic Rate*,RV Detail\x01Amount*',
|
||||||
'creation': '2011-01-19 17:47:20',
|
'creation': '2011-01-19 17:33:33',
|
||||||
'criteria_name': 'Itemwise Sales Register',
|
'criteria_name': 'Itemwise Sales Register',
|
||||||
'custom_query': '',
|
'custom_query': '',
|
||||||
'description': None,
|
'description': None,
|
||||||
@@ -13,12 +13,12 @@
|
|||||||
'doc_type': 'RV Detail',
|
'doc_type': 'RV Detail',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'doctype': 'Search Criteria',
|
'doctype': 'Search Criteria',
|
||||||
'filters': "{'Receivable Voucher\x01Submitted':1,'Receivable Voucher\x01Is Opening':'','Receivable Voucher\x01Fiscal Year':''}",
|
'filters': "{'Receivable Voucher\x01Submitted':1,'Receivable Voucher\x01From Posting Date\x01lower':'2011-04-01','Receivable Voucher\x01To Posting Date\x01upper':'2011-06-20','Receivable Voucher\x01Is Opening':'','Receivable Voucher\x01Company':'Test Company','Receivable Voucher\x01Fiscal Year':''}",
|
||||||
'graph_series': None,
|
'graph_series': None,
|
||||||
'graph_values': None,
|
'graph_values': None,
|
||||||
'group_by': None,
|
'group_by': None,
|
||||||
'idx': None,
|
'idx': None,
|
||||||
'modified': '2011-01-19 15:56:31',
|
'modified': '2011-06-20 13:12:25',
|
||||||
'modified_by': 'Administrator',
|
'modified_by': 'Administrator',
|
||||||
'module': 'Accounts',
|
'module': 'Accounts',
|
||||||
'name': 'itemwise_sales_register',
|
'name': 'itemwise_sales_register',
|
||||||
@@ -28,9 +28,9 @@
|
|||||||
'parent_doc_type': 'Receivable Voucher',
|
'parent_doc_type': 'Receivable Voucher',
|
||||||
'parentfield': None,
|
'parentfield': None,
|
||||||
'parenttype': None,
|
'parenttype': None,
|
||||||
'report_script': '',
|
'report_script': None,
|
||||||
'server_script': None,
|
'server_script': None,
|
||||||
'sort_by': '`tabReceivable Voucher`.`name`',
|
'sort_by': '`tabRV Detail`.`income_account`',
|
||||||
'sort_order': 'DESC',
|
'sort_order': 'DESC',
|
||||||
'standard': 'Yes'
|
'standard': 'Yes'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user