reports fixed: itemwise sales/delivery report

This commit is contained in:
Nabin Hait 2012-05-03 18:22:32 +05:30
parent a67f706c92
commit 7c60fc13b2
5 changed files with 17 additions and 19 deletions

View File

@ -15,9 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
report.customize_filters = function() {
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'From Voucher Date'].df['report_default'] = sys_defaults.year_start_date;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Voucher Date'].df['report_default'] = dateutil.obj_to_str(new Date());
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
}
}

View File

@ -15,12 +15,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
out=[]
qty,amt,bil_qty=0,0,0
qty,amt,bill_amt=0,0,0
for r in res:
qty += flt(r[col_idx['Quantity']])
amt += flt(r[col_idx['Amount*']])
bil_qty += flt(r[col_idx['Billed Qty']])
bill_amt += flt(r[col_idx['Billed Amt']])
out.append(r)
@ -29,5 +29,5 @@ l_row = ['' for i in range(len(colnames))]
l_row[col_idx['Item Name']] = '<b>TOTALS</b>'
l_row[col_idx['Quantity']] = qty
l_row[col_idx['Amount*']] = amt
l_row[col_idx['Billed Qty']] = bil_qty
out.append(l_row)
l_row[col_idx['Billed Amt']] = bill_amt
out.append(l_row)

View File

@ -3,20 +3,20 @@
# These values are common in all dictionaries
{
'creation': '2012-04-03 12:49:51',
'creation': '2012-04-23 12:46:00',
'docstatus': 0,
'modified': '2012-04-03 12:49:51',
'modified': '2012-05-03 18:13:49',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Search Criteria
{
'columns': u'Delivery Note\x01ID,Delivery Note Item\x01Item Code,Delivery Note Item\x01Item Name,Delivery Note Item\x01Quantity,Delivery Note Item\x01Rate*,Delivery Note Item\x01Amount*,Delivery Note Item\x01Billed Qty,Delivery Note\x01Company',
'columns': u'Delivery Note\x01ID,Delivery Note Item\x01Item Code,Delivery Note Item\x01Item Name,Delivery Note Item\x01Quantity,Delivery Note Item\x01Rate*,Delivery Note Item\x01Amount*,Delivery Note Item\x01Billed Amt',
'criteria_name': u'Itemwise Delivery Details',
'doc_type': u'Delivery Note Item',
'doctype': 'Search Criteria',
'filters': u"{'Delivery Note\x01Submitted':1,'Delivery Note\x01Status':'','Delivery Note\x01From Voucher Date\x01lower':'','Delivery Note\x01To Voucher Date\x01upper':'','Delivery Note\x01Fiscal Year':''}",
'filters': u'{"Delivery Note\\u0001Submitted":1,"Delivery Note\\u0001Status":[""],"Delivery Note\\u0001Fiscal Year":[""]}',
'module': u'Selling',
'name': '__common__',
'page_len': 50,

View File

@ -15,13 +15,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
out=[]
qty,amt,del_qty,bil_qty=0,0,0,0
qty,amt,del_qty,bill_amt=0,0,0,0
for r in res:
qty += flt(r[col_idx['Quantity']])
amt += flt(r[col_idx['Amount*']])
del_qty += flt(r[col_idx['Delivered Qty']])
bil_qty += flt(r[col_idx['Billed Qty']])
bill_amt += flt(r[col_idx['Billed Amt']])
out.append(r)
@ -31,5 +31,5 @@ l_row[col_idx['Item Name']] = '<b>TOTALS</b>'
l_row[col_idx['Quantity']] = qty
l_row[col_idx['Amount*']] = amt
l_row[col_idx['Delivered Qty']] = del_qty
l_row[col_idx['Billed Qty']] = bil_qty
out.append(l_row)
l_row[col_idx['Billed Amt']] = bill_amt
out.append(l_row)

View File

@ -3,20 +3,20 @@
# These values are common in all dictionaries
{
'creation': '2012-04-03 12:49:51',
'creation': '2012-04-23 12:46:00',
'docstatus': 0,
'modified': '2012-04-03 12:49:51',
'modified': '2012-05-03 18:18:31',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Search Criteria
{
'columns': u'Sales Order\x01ID,Sales Order\x01Customer,Sales Order Item\x01Item Code,Sales Order Item\x01Item Name,Sales Order Item\x01Quantity,Sales Order Item\x01Basic Rate*,Sales Order Item\x01Amount*,Sales Order Item\x01Delivered Qty,Sales Order Item\x01Billed Qty,Sales Order\x01Company',
'columns': u'Sales Order\x01ID,Sales Order\x01Customer,Sales Order Item\x01Item Code,Sales Order Item\x01Item Name,Sales Order Item\x01Quantity,Sales Order Item\x01Basic Rate*,Sales Order Item\x01Amount*,Sales Order Item\x01Delivered Qty,Sales Order Item\x01Billed Amt',
'criteria_name': u'Itemwise Sales Details',
'doc_type': u'Sales Order Item',
'doctype': 'Search Criteria',
'filters': u"{'Sales Order\x01Submitted':1,'Sales Order\x01Status':'','Sales Order\x01Fiscal Year':''}",
'filters': u'{"Sales Order\\u0001Submitted":1,"Sales Order\\u0001Fiscal Year":[""],"Sales Order\\u0001Status":[""]}',
'module': u'Selling',
'name': '__common__',
'page_len': 50,