field hide/unhide for pos

This commit is contained in:
Nabin Hait 2011-10-10 12:33:43 +05:30
parent 6a0561612f
commit 2810691979
2 changed files with 226 additions and 297 deletions

View File

@ -13,8 +13,8 @@ $import(SMS Control)
// On Load // On Load
// ------- // -------
cur_frm.cscript.onload = function(doc,dt,dn) { cur_frm.cscript.onload = function(doc,dt,dn) {
if(!doc.customer && doc.debit_to) get_field(dt, 'debit_to', dn).print_hide = 0; if(!doc.customer && doc.debit_to) get_field(dt, 'debit_to', dn).print_hide = 0;
if (doc.__islocal) { if (doc.__islocal) {
if(!doc.voucher_date) set_multiple(dt,dn,{voucher_date:get_today()}); if(!doc.voucher_date) set_multiple(dt,dn,{voucher_date:get_today()});
if(!doc.due_date) set_multiple(dt,dn,{due_date:get_today()}); if(!doc.due_date) set_multiple(dt,dn,{due_date:get_today()});
if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()}); if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
@ -22,8 +22,8 @@ cur_frm.cscript.onload = function(doc,dt,dn) {
//for previously created sales invoice, set required field related to pos //for previously created sales invoice, set required field related to pos
if(doc.is_pos ==1) cur_frm.cscript.is_pos(doc, dt, dn); if(doc.is_pos ==1) cur_frm.cscript.is_pos(doc, dt, dn);
hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']); hide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
} }
} }
cur_frm.cscript.onload_post_render = function(doc, dt, dn) { cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
@ -48,10 +48,25 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
// Hide Fields // Hide Fields
// ------------ // ------------
cur_frm.cscript.hide_fields = function(doc, cdt, cdn) { cur_frm.cscript.hide_fields = function(doc, cdt, cdn) {
if(cint(doc.is_pos) == 1) par_flds =['project_name', 'due_date', 'posting_time', 'sales_order_main', 'delivery_note_main', 'Get Items', 'company', 'is_opening', 'currency', 'conversion_rate', 'price_list_name', 'cash_bank_account', 'source', 'cancel_reason', 'total_advance', 'gross_profit', 'gross_profit_percent', 'Get Advances Received', 'advance_adjustment_details', 'sales_partner', 'commission_rate', 'total_commission', 'Repair Outstanding Amt'];
hide_field(['project_name', 'due_date', 'posting_time', 'sales_order_main', 'delivery_note_main', 'Get Items']);
else ch_flds = {'entries': ['income_account', 'warehouse', 'cost_center', 'sales_order', 'delivery_note']}
unhide_field(['project_name', 'due_date', 'posting_time', 'sales_order_main', 'delivery_note_main', 'Get Items']);
if(cint(doc.is_pos) == 1) {
hide_field(par_flds);
for(t in ch_flds) {
for(f in ch_flds[t]) {
cur_frm.fields_dict[t].grid.set_column_disp(ch_flds[t][f], false);
}
}
} else {
unhide_field(par_flds);
for (t in ch_flds) {
for (f in ch_flds[t]) {
cur_frm.fields_dict[t].grid.set_column_disp(ch_flds[t][f], true);
}
}
}
} }
@ -59,53 +74,53 @@ cur_frm.cscript.hide_fields = function(doc, cdt, cdn) {
// ------- // -------
cur_frm.cscript.refresh = function(doc, dt, dn) { cur_frm.cscript.refresh = function(doc, dt, dn) {
// Show / Hide button // Show / Hide button
cur_frm.clear_custom_buttons(); cur_frm.clear_custom_buttons();
if(doc.docstatus==1) { if(doc.docstatus==1) {
cur_frm.add_custom_button('View Ledger', cur_frm.cscript['View Ledger Entry']); cur_frm.add_custom_button('View Ledger', cur_frm.cscript['View Ledger Entry']);
cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']); cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
unhide_field('Repair Outstanding Amt'); unhide_field('Repair Outstanding Amt');
if(doc.is_pos==1 && doc.update_stock!=1) if(doc.is_pos==1 && doc.update_stock!=1)
cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']); cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']);
if(doc.outstanding_amount!=0) if(doc.outstanding_amount!=0)
cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript['Make Bank Voucher']); cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript['Make Bank Voucher']);
} }
else else
hide_field('Repair Outstanding Amt'); hide_field('Repair Outstanding Amt');
cur_frm.cscript.is_opening(doc, dt, dn); cur_frm.cscript.is_opening(doc, dt, dn);
cur_frm.cscript.hide_fields(doc, cdt, cdn); cur_frm.cscript.hide_fields(doc, cdt, cdn);
} }
//fetch retail transaction related fields //fetch retail transaction related fields
//-------------------------------------------- //--------------------------------------------
cur_frm.cscript.is_pos = function(doc,dt,dn){ cur_frm.cscript.is_pos = function(doc,dt,dn){
cur_frm.cscript.hide_fields(doc, cdt, cdn); cur_frm.cscript.hide_fields(doc, cdt, cdn);
if(doc.is_pos == 1){ if(doc.is_pos == 1){
if (!doc.company) { if (!doc.company) {
msgprint("Please select company to proceed"); msgprint("Please select company to proceed");
doc.is_pos = 0; doc.is_pos = 0;
refresh_field('is_pos'); refresh_field('is_pos');
} }
else { else {
var callback = function(r,rt){ var callback = function(r,rt){
cur_frm.refresh(); cur_frm.refresh();
} }
$c_obj(make_doclist(dt,dn),'set_pos_fields','',callback); $c_obj(make_doclist(dt,dn),'set_pos_fields','',callback);
} }
} }
} }
cur_frm.cscript.warehouse = function(doc, cdt , cdn) { cur_frm.cscript.warehouse = function(doc, cdt , cdn) {
var d = locals[cdt][cdn]; var d = locals[cdt][cdn];
if (!d.item_code) {alert("please enter item code first"); return}; if (!d.item_code) {alert("please enter item code first"); return};
if (d.warehouse) { if (d.warehouse) {
arg = "{'item_code':'" + d.item_code + "','warehouse':'" + d.warehouse +"'}"; arg = "{'item_code':'" + d.item_code + "','warehouse':'" + d.warehouse +"'}";
get_server_fields('get_actual_qty',arg,'entries',doc,cdt,cdn,1); get_server_fields('get_actual_qty',arg,'entries',doc,cdt,cdn,1);
} }
} }
@ -113,57 +128,57 @@ cur_frm.cscript.warehouse = function(doc, cdt , cdn) {
//Customer //Customer
cur_frm.cscript.customer = function(doc,dt,dn) { cur_frm.cscript.customer = function(doc,dt,dn) {
var callback = function(r,rt) { var callback = function(r,rt) {
var doc = locals[cur_frm.doctype][cur_frm.docname]; var doc = locals[cur_frm.doctype][cur_frm.docname];
get_server_fields('get_debit_to','','',doc, dt, dn, 0); get_server_fields('get_debit_to','','',doc, dt, dn, 0);
cur_frm.refresh(); cur_frm.refresh();
} }
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback); if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']); if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
} }
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) { cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1); if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
} }
cur_frm.fields_dict.customer_address.on_new = function(dn) { cur_frm.fields_dict.customer_address.on_new = function(dn) {
locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer; locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name; locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
} }
cur_frm.fields_dict.contact_person.on_new = function(dn) { cur_frm.fields_dict.contact_person.on_new = function(dn) {
locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer; locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name; locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
} }
cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) { cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
} }
cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) { cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50'; return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
} }
// Set Due Date = posting date + credit days // Set Due Date = posting date + credit days
cur_frm.cscript.debit_to = function(doc,dt,dn) { cur_frm.cscript.debit_to = function(doc,dt,dn) {
var callback2 = function(r,rt) { var callback2 = function(r,rt) {
var doc = locals[cur_frm.doctype][cur_frm.docname]; var doc = locals[cur_frm.doctype][cur_frm.docname];
cur_frm.refresh(); cur_frm.refresh();
} }
var callback = function(r,rt) { var callback = function(r,rt) {
var doc = locals[cur_frm.doctype][cur_frm.docname]; var doc = locals[cur_frm.doctype][cur_frm.docname];
if(doc.customer) $c_obj(make_doclist(dt,dn), 'get_default_customer_address', '', callback2); if(doc.customer) $c_obj(make_doclist(dt,dn), 'get_default_customer_address', '', callback2);
if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']); if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
cur_frm.refresh(); cur_frm.refresh();
} }
if(doc.debit_to && doc.posting_date){ if(doc.debit_to && doc.posting_date){
get_server_fields('get_cust_and_due_date','','',doc,dt,dn,1,callback); get_server_fields('get_cust_and_due_date','','',doc,dt,dn,1,callback);
} }
} }
@ -172,15 +187,15 @@ cur_frm.cscript.debit_to = function(doc,dt,dn) {
//------------------------------------------------- //-------------------------------------------------
cur_frm.cscript.paid_amount = function(doc,dt,dn){ cur_frm.cscript.paid_amount = function(doc,dt,dn){
doc.outstanding_amount = flt(doc.grand_total) - flt(doc.paid_amount) - flt(doc.write_off_amount); doc.outstanding_amount = flt(doc.grand_total) - flt(doc.paid_amount) - flt(doc.write_off_amount);
refresh_field('outstanding_amount'); refresh_field('outstanding_amount');
} }
//---- get customer details ---------------------------- //---- get customer details ----------------------------
cur_frm.cscript.project_name = function(doc,cdt,cdn){ cur_frm.cscript.project_name = function(doc,cdt,cdn){
$c_obj(make_doclist(doc.doctype, doc.name),'pull_project_customer','', function(r,rt){ $c_obj(make_doclist(doc.doctype, doc.name),'pull_project_customer','', function(r,rt){
refresh_many(['customer', 'customer_name','customer_address', 'territory']); refresh_many(['customer', 'customer_name','customer_address', 'territory']);
}); });
} }
@ -188,26 +203,26 @@ cur_frm.cscript.project_name = function(doc,cdt,cdn){
//---------------------------------------------- //----------------------------------------------
cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){ cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){
cl = getchildren('RV Detail', doc.name, cur_frm.cscript.fname, doc.doctype); cl = getchildren('RV Detail', doc.name, cur_frm.cscript.fname, doc.doctype);
acc = ''; acc = '';
cc = ''; cc = '';
for(var i = 0; i<cl.length; i++) { for(var i = 0; i<cl.length; i++) {
if (cl[i].idx == 1){ if (cl[i].idx == 1){
acc = cl[i].income_account; acc = cl[i].income_account;
cc = cl[i].cost_center; cc = cl[i].cost_center;
} }
else{ else{
if (! cl[i].income_account) { cl[i].income_account = acc; refresh_field('income_account', cl[i].name, 'entries');} if (! cl[i].income_account) { cl[i].income_account = acc; refresh_field('income_account', cl[i].name, 'entries');}
if (! cl[i].cost_center) {cl[i].cost_center = cc;refresh_field('cost_center', cl[i].name, 'entries');} if (! cl[i].cost_center) {cl[i].cost_center = cc;refresh_field('cost_center', cl[i].name, 'entries');}
} }
} }
} }
cur_frm.cscript.is_opening = function(doc, dt, dn) { cur_frm.cscript.is_opening = function(doc, dt, dn) {
hide_field('aging_date'); hide_field('aging_date');
if (doc.is_opening == 'Yes') unhide_field('aging_date'); if (doc.is_opening == 'Yes') unhide_field('aging_date');
} }
/* **************************** TRIGGERS ********************************** */ /* **************************** TRIGGERS ********************************** */
@ -221,11 +236,11 @@ cur_frm.cscript.is_opening = function(doc, dt, dn) {
// Get Items based on SO or DN Selected // Get Items based on SO or DN Selected
cur_frm.cscript['Get Items'] = function(doc, dt, dn) { cur_frm.cscript['Get Items'] = function(doc, dt, dn) {
var callback = function(r,rt) { var callback = function(r,rt) {
unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']); unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
cur_frm.refresh(); cur_frm.refresh();
} }
get_server_fields('pull_details','','',doc, dt, dn,1,callback); get_server_fields('pull_details','','',doc, dt, dn,1,callback);
} }
@ -233,7 +248,7 @@ cur_frm.cscript['Get Items'] = function(doc, dt, dn) {
// Allocated Amount in advances table // Allocated Amount in advances table
// ----------------------------------- // -----------------------------------
cur_frm.cscript.allocated_amount = function(doc,cdt,cdn){ cur_frm.cscript.allocated_amount = function(doc,cdt,cdn){
cur_frm.cscript.calc_adjustment_amount(doc,cdt,cdn); cur_frm.cscript.calc_adjustment_amount(doc,cdt,cdn);
} }
//Make Delivery Note Button //Make Delivery Note Button
@ -241,18 +256,18 @@ cur_frm.cscript.allocated_amount = function(doc,cdt,cdn){
cur_frm.cscript['Make Delivery Note'] = function() { cur_frm.cscript['Make Delivery Note'] = function() {
var doc = cur_frm.doc var doc = cur_frm.doc
n = createLocal('Delivery Note'); n = createLocal('Delivery Note');
$c('dt_map', args={ $c('dt_map', args={
'docs':compress_doclist([locals['Delivery Note'][n]]), 'docs':compress_doclist([locals['Delivery Note'][n]]),
'from_doctype':doc.doctype, 'from_doctype':doc.doctype,
'to_doctype':'Delivery Note', 'to_doctype':'Delivery Note',
'from_docname':doc.name, 'from_docname':doc.name,
'from_to_list':"[['Receivable Voucher','Delivery Note'],['RV Detail','Delivery Note Detail'],['RV Tax Detail','RV Tax Detail'],['Sales Team','Sales Team']]" 'from_to_list':"[['Receivable Voucher','Delivery Note'],['RV Detail','Delivery Note Detail'],['RV Tax Detail','RV Tax Detail'],['Sales Team','Sales Team']]"
}, function(r,rt) { }, function(r,rt) {
loaddoc('Delivery Note', n); loaddoc('Delivery Note', n);
} }
); );
} }
@ -260,7 +275,7 @@ cur_frm.cscript['Make Delivery Note'] = function() {
// Make Bank Voucher Button // Make Bank Voucher Button
// ------------------------- // -------------------------
cur_frm.cscript['Make Bank Voucher'] = function(doc, dt, dn) { cur_frm.cscript['Make Bank Voucher'] = function(doc, dt, dn) {
cur_frm.cscript.make_jv(cur_frm.doc); cur_frm.cscript.make_jv(cur_frm.doc);
} }
@ -269,101 +284,101 @@ cur_frm.cscript['Make Bank Voucher'] = function(doc, dt, dn) {
// Debit To // Debit To
// --------- // ---------
cur_frm.fields_dict.debit_to.get_query = function(doc) { cur_frm.fields_dict.debit_to.get_query = function(doc) {
return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.debit_or_credit="Debit" AND tabAccount.is_pl_account = "No" AND tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus!=2 AND tabAccount.company="'+doc.company+'" AND tabAccount.%(key)s LIKE "%s"' return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.debit_or_credit="Debit" AND tabAccount.is_pl_account = "No" AND tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus!=2 AND tabAccount.company="'+doc.company+'" AND tabAccount.%(key)s LIKE "%s"'
} }
// Cash/bank account // Cash/bank account
//------------------ //------------------
cur_frm.fields_dict.cash_bank_account.get_query = function(doc) { cur_frm.fields_dict.cash_bank_account.get_query = function(doc) {
return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.debit_or_credit="Debit" AND tabAccount.is_pl_account = "No" AND tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus!=2 AND tabAccount.company="'+doc.company+'" AND tabAccount.%(key)s LIKE "%s"' return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.debit_or_credit="Debit" AND tabAccount.is_pl_account = "No" AND tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus!=2 AND tabAccount.company="'+doc.company+'" AND tabAccount.%(key)s LIKE "%s"'
} }
// Write off account // Write off account
//------------------ //------------------
cur_frm.fields_dict.write_off_account.get_query = function(doc) { cur_frm.fields_dict.write_off_account.get_query = function(doc) {
return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.debit_or_credit="Debit" AND tabAccount.is_pl_account = "Yes" AND tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus!=2 AND tabAccount.company="'+doc.company+'" AND tabAccount.%(key)s LIKE "%s"' return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.debit_or_credit="Debit" AND tabAccount.is_pl_account = "Yes" AND tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus!=2 AND tabAccount.company="'+doc.company+'" AND tabAccount.%(key)s LIKE "%s"'
} }
// Write off cost center // Write off cost center
//----------------------- //-----------------------
cur_frm.fields_dict.write_off_cost_center.get_query = function(doc) { cur_frm.fields_dict.write_off_cost_center.get_query = function(doc) {
return 'SELECT `tabCost Center`.name FROM `tabCost Center` WHERE `tabCost Center`.group_or_ledger="Ledger" AND `tabCost Center`.docstatus!=2 AND `tabCost Center`.company_name="'+doc.company+'" AND `tabCost Center`.%(key)s LIKE "%s"' return 'SELECT `tabCost Center`.name FROM `tabCost Center` WHERE `tabCost Center`.group_or_ledger="Ledger" AND `tabCost Center`.docstatus!=2 AND `tabCost Center`.company_name="'+doc.company+'" AND `tabCost Center`.%(key)s LIKE "%s"'
} }
//project name //project name
//-------------------------- //--------------------------
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) { cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
var cond = ''; var cond = '';
if(doc.customer) cond = '(`tabProject`.customer = "'+doc.customer+'" OR IFNULL(`tabProject`.customer,"")="") AND'; if(doc.customer) cond = '(`tabProject`.customer = "'+doc.customer+'" OR IFNULL(`tabProject`.customer,"")="") AND';
return repl('SELECT `tabProject`.name FROM `tabProject` WHERE `tabProject`.status = "Open" AND %(cond)s `tabProject`.name LIKE "%s" ORDER BY `tabProject`.name ASC LIMIT 50', {cond:cond}); return repl('SELECT `tabProject`.name FROM `tabProject` WHERE `tabProject`.status = "Open" AND %(cond)s `tabProject`.name LIKE "%s" ORDER BY `tabProject`.name ASC LIMIT 50', {cond:cond});
} }
//Territory //Territory
//----------------------------- //-----------------------------
cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) { cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50'; return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
} }
// Income Account in Details Table // Income Account in Details Table
// -------------------------------- // --------------------------------
cur_frm.fields_dict.entries.grid.get_field("income_account").get_query = function(doc) { cur_frm.fields_dict.entries.grid.get_field("income_account").get_query = function(doc) {
return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.debit_or_credit="Credit" AND tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus!=2 AND tabAccount.company="'+doc.company+'" AND tabAccount.%(key)s LIKE "%s"'; return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.debit_or_credit="Credit" AND tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus!=2 AND tabAccount.company="'+doc.company+'" AND tabAccount.%(key)s LIKE "%s"';
} }
// warehouse in detail table // warehouse in detail table
//---------------------------- //----------------------------
cur_frm.fields_dict['entries'].grid.get_field('warehouse').get_query= function(doc, cdt, cdn) { cur_frm.fields_dict['entries'].grid.get_field('warehouse').get_query= function(doc, cdt, cdn) {
var d = locals[cdt][cdn]; var d = locals[cdt][cdn];
return "SELECT `tabBin`.`warehouse`, `tabBin`.`actual_qty` FROM `tabBin` WHERE `tabBin`.`item_code` = '"+ d.item_code +"' AND ifnull(`tabBin`.`actual_qty`,0) > 0 AND `tabBin`.`warehouse` like '%s' ORDER BY `tabBin`.`warehouse` DESC LIMIT 50"; return "SELECT `tabBin`.`warehouse`, `tabBin`.`actual_qty` FROM `tabBin` WHERE `tabBin`.`item_code` = '"+ d.item_code +"' AND ifnull(`tabBin`.`actual_qty`,0) > 0 AND `tabBin`.`warehouse` like '%s' ORDER BY `tabBin`.`warehouse` DESC LIMIT 50";
} }
// Cost Center in Details Table // Cost Center in Details Table
// ----------------------------- // -----------------------------
cur_frm.fields_dict.entries.grid.get_field("cost_center").get_query = function(doc) { cur_frm.fields_dict.entries.grid.get_field("cost_center").get_query = function(doc) {
return 'SELECT `tabCost Center`.`name` FROM `tabCost Center` WHERE `tabCost Center`.`company_name` = "' +doc.company+'" AND `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.`docstatus`!= 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50'; return 'SELECT `tabCost Center`.`name` FROM `tabCost Center` WHERE `tabCost Center`.`company_name` = "' +doc.company+'" AND `tabCost Center`.%(key)s LIKE "%s" AND `tabCost Center`.`group_or_ledger` = "Ledger" AND `tabCost Center`.`docstatus`!= 2 ORDER BY `tabCost Center`.`name` ASC LIMIT 50';
} }
// Sales Order // Sales Order
// ----------- // -----------
cur_frm.fields_dict.sales_order_main.get_query = function(doc) { cur_frm.fields_dict.sales_order_main.get_query = function(doc) {
if (doc.customer) if (doc.customer)
return 'SELECT DISTINCT `tabSales Order`.`name` FROM `tabSales Order` WHERE `tabSales Order`.company = "' + doc.company + '" and `tabSales Order`.`docstatus` = 1 and `tabSales Order`.`status` != "Stopped" and ifnull(`tabSales Order`.per_billed,0) < 100 and `tabSales Order`.`customer` = "' + doc.customer + '" and `tabSales Order`.%(key)s LIKE "%s" ORDER BY `tabSales Order`.`name` DESC LIMIT 50'; return 'SELECT DISTINCT `tabSales Order`.`name` FROM `tabSales Order` WHERE `tabSales Order`.company = "' + doc.company + '" and `tabSales Order`.`docstatus` = 1 and `tabSales Order`.`status` != "Stopped" and ifnull(`tabSales Order`.per_billed,0) < 100 and `tabSales Order`.`customer` = "' + doc.customer + '" and `tabSales Order`.%(key)s LIKE "%s" ORDER BY `tabSales Order`.`name` DESC LIMIT 50';
else else
return 'SELECT DISTINCT `tabSales Order`.`name` FROM `tabSales Order` WHERE `tabSales Order`.company = "' + doc.company + '" and `tabSales Order`.`docstatus` = 1 and `tabSales Order`.`status` != "Stopped" and ifnull(`tabSales Order`.per_billed,0) < 100 and `tabSales Order`.%(key)s LIKE "%s" ORDER BY `tabSales Order`.`name` DESC LIMIT 50'; return 'SELECT DISTINCT `tabSales Order`.`name` FROM `tabSales Order` WHERE `tabSales Order`.company = "' + doc.company + '" and `tabSales Order`.`docstatus` = 1 and `tabSales Order`.`status` != "Stopped" and ifnull(`tabSales Order`.per_billed,0) < 100 and `tabSales Order`.%(key)s LIKE "%s" ORDER BY `tabSales Order`.`name` DESC LIMIT 50';
} }
// Delivery Note // Delivery Note
// -------------- // --------------
cur_frm.fields_dict.delivery_note_main.get_query = function(doc) { cur_frm.fields_dict.delivery_note_main.get_query = function(doc) {
if (doc.customer) if (doc.customer)
return 'SELECT DISTINCT `tabDelivery Note`.`name` FROM `tabDelivery Note` WHERE `tabDelivery Note`.company = "' + doc.company + '" and `tabDelivery Note`.`docstatus` = 1 and ifnull(`tabDelivery Note`.per_billed,0) < 100 and `tabDelivery Note`.`customer` = "' + doc.customer + '" and `tabDelivery Note`.%(key)s LIKE "%s" ORDER BY `tabDelivery Note`.`name` DESC LIMIT 50'; return 'SELECT DISTINCT `tabDelivery Note`.`name` FROM `tabDelivery Note` WHERE `tabDelivery Note`.company = "' + doc.company + '" and `tabDelivery Note`.`docstatus` = 1 and ifnull(`tabDelivery Note`.per_billed,0) < 100 and `tabDelivery Note`.`customer` = "' + doc.customer + '" and `tabDelivery Note`.%(key)s LIKE "%s" ORDER BY `tabDelivery Note`.`name` DESC LIMIT 50';
else else
return 'SELECT DISTINCT `tabDelivery Note`.`name` FROM `tabDelivery Note` WHERE `tabDelivery Note`.company = "' + doc.company + '" and `tabDelivery Note`.`docstatus` = 1 and ifnull(`tabDelivery Note`.per_billed,0) < 100 and `tabDelivery Note`.%(key)s LIKE "%s" ORDER BY `tabDelivery Note`.`name` DESC LIMIT 50'; return 'SELECT DISTINCT `tabDelivery Note`.`name` FROM `tabDelivery Note` WHERE `tabDelivery Note`.company = "' + doc.company + '" and `tabDelivery Note`.`docstatus` = 1 and ifnull(`tabDelivery Note`.per_billed,0) < 100 and `tabDelivery Note`.%(key)s LIKE "%s" ORDER BY `tabDelivery Note`.`name` DESC LIMIT 50';
} }
cur_frm.cscript.income_account = function(doc, cdt, cdn){ cur_frm.cscript.income_account = function(doc, cdt, cdn){
var d = locals[cdt][cdn]; var d = locals[cdt][cdn];
if(d.income_account){ if(d.income_account){
var cl = getchildren('RV Detail', doc.name, cur_frm.cscript.fname, doc.doctype); var cl = getchildren('RV Detail', doc.name, cur_frm.cscript.fname, doc.doctype);
for(var i = 0; i < cl.length; i++){ for(var i = 0; i < cl.length; i++){
if(!cl[i].income_account) cl[i].income_account = d.income_account; if(!cl[i].income_account) cl[i].income_account = d.income_account;
} }
} }
refresh_field(cur_frm.cscript.fname); refresh_field(cur_frm.cscript.fname);
} }
cur_frm.cscript.cost_center = function(doc, cdt, cdn){ cur_frm.cscript.cost_center = function(doc, cdt, cdn){
var d = locals[cdt][cdn]; var d = locals[cdt][cdn];
if(d.cost_center){ if(d.cost_center){
var cl = getchildren('RV Detail', doc.name, cur_frm.cscript.fname, doc.doctype); var cl = getchildren('RV Detail', doc.name, cur_frm.cscript.fname, doc.doctype);
for(var i = 0; i < cl.length; i++){ for(var i = 0; i < cl.length; i++){
if(!cl[i].cost_center) cl[i].cost_center = d.cost_center; if(!cl[i].cost_center) cl[i].cost_center = d.cost_center;
} }
} }
refresh_field(cur_frm.cscript.fname); refresh_field(cur_frm.cscript.fname);
} }
/* **************************************** Utility Functions *************************************** */ /* **************************************** Utility Functions *************************************** */
@ -371,49 +386,49 @@ cur_frm.cscript.cost_center = function(doc, cdt, cdn){
// Details Calculation // Details Calculation
// -------------------- // --------------------
cur_frm.cscript.calc_adjustment_amount = function(doc,cdt,cdn) { cur_frm.cscript.calc_adjustment_amount = function(doc,cdt,cdn) {
var doc = locals[doc.doctype][doc.name]; var doc = locals[doc.doctype][doc.name];
var el = getchildren('Advance Adjustment Detail',doc.name,'advance_adjustment_details'); var el = getchildren('Advance Adjustment Detail',doc.name,'advance_adjustment_details');
var total_adjustment_amt = 0 var total_adjustment_amt = 0
for(var i in el) { for(var i in el) {
total_adjustment_amt += flt(el[i].allocated_amount) total_adjustment_amt += flt(el[i].allocated_amount)
} }
doc.total_advance = flt(total_adjustment_amt); doc.total_advance = flt(total_adjustment_amt);
doc.outstanding_amount = flt(doc.grand_total) - flt(total_adjustment_amt) - flt(doc.paid_amount) - flt(doc.write_off_amount); doc.outstanding_amount = flt(doc.grand_total) - flt(total_adjustment_amt) - flt(doc.paid_amount) - flt(doc.write_off_amount);
refresh_many(['total_advance','outstanding_amount']); refresh_many(['total_advance','outstanding_amount']);
} }
// Make Journal Voucher // Make Journal Voucher
// -------------------- // --------------------
cur_frm.cscript.make_jv = function(doc, dt, dn) { cur_frm.cscript.make_jv = function(doc, dt, dn) {
var jv = LocalDB.create('Journal Voucher'); var jv = LocalDB.create('Journal Voucher');
jv = locals['Journal Voucher'][jv]; jv = locals['Journal Voucher'][jv];
jv.voucher_type = 'Bank Voucher'; jv.voucher_type = 'Bank Voucher';
jv.company = doc.company; jv.company = doc.company;
jv.remark = repl('Payment received against invoice %(vn)s for %(rem)s', {vn:doc.name, rem:doc.remarks}); jv.remark = repl('Payment received against invoice %(vn)s for %(rem)s', {vn:doc.name, rem:doc.remarks});
jv.fiscal_year = doc.fiscal_year; jv.fiscal_year = doc.fiscal_year;
// debit to creditor // debit to creditor
var d1 = LocalDB.add_child(jv, 'Journal Voucher Detail', 'entries'); var d1 = LocalDB.add_child(jv, 'Journal Voucher Detail', 'entries');
d1.account = doc.debit_to; d1.account = doc.debit_to;
d1.credit = doc.outstanding_amount; d1.credit = doc.outstanding_amount;
d1.against_invoice = doc.name; d1.against_invoice = doc.name;
// credit to bank // credit to bank
var d1 = LocalDB.add_child(jv, 'Journal Voucher Detail', 'entries'); var d1 = LocalDB.add_child(jv, 'Journal Voucher Detail', 'entries');
d1.debit = doc.outstanding_amount; d1.debit = doc.outstanding_amount;
loaddoc('Journal Voucher', jv.name); loaddoc('Journal Voucher', jv.name);
} }
/****************** Get Accounting Entry *****************/ /****************** Get Accounting Entry *****************/
cur_frm.cscript['View Ledger Entry'] = function(){ cur_frm.cscript['View Ledger Entry'] = function(){
var callback = function(report){ var callback = function(report){
report.set_filter('GL Entry', 'Voucher No',cur_frm.doc.name); report.set_filter('GL Entry', 'Voucher No',cur_frm.doc.name);
report.dt.run(); report.dt.run();
} }
loadreport('GL Entry','General Ledger', callback); loadreport('GL Entry','General Ledger', callback);
} }

View File

@ -5,16 +5,17 @@
{ {
'creation': '2010-08-08 17:09:18', 'creation': '2010-08-08 17:09:18',
'docstatus': 0, 'docstatus': 0,
'modified': '2011-06-20 13:02:04', 'modified': '2011-10-10 12:29:26',
'modified_by': 'Administrator', 'modified_by': 'Administrator',
'owner': 'Administrator' 'owner': 'Administrator'
}, },
# These values are common for all DocType # These values are common for all DocType
{ {
'_last_update': '1309508839', '_last_update': '1317986484',
'change_log': '1. Change in pull_details method dt.-26-06-2009', 'change_log': '1. Change in pull_details method dt.-26-06-2009',
'colour': 'White:FFF', 'colour': 'White:FFF',
'default_print_format': 'Standard',
'doctype': 'DocType', 'doctype': 'DocType',
'module': 'Accounts', 'module': 'Accounts',
'name': '__common__', 'name': '__common__',
@ -24,7 +25,7 @@
'server_code_error': ' ', 'server_code_error': ' ',
'show_in_menu': 0, 'show_in_menu': 0,
'subject': 'To %(customer_name)s worth %(currency)s %(grand_total_export)s due on %(due_date)s | %(outstanding_amount)s outstanding', 'subject': 'To %(customer_name)s worth %(currency)s %(grand_total_export)s due on %(due_date)s | %(outstanding_amount)s outstanding',
'version': 356 'version': 359
}, },
# These values are common for all DocField # These values are common for all DocField
@ -58,7 +59,6 @@
'cancel': 0, 'cancel': 0,
'create': 0, 'create': 0,
'doctype': 'DocPerm', 'doctype': 'DocPerm',
'idx': 1,
'permlevel': 1, 'permlevel': 1,
'role': 'Accounts Manager', 'role': 'Accounts Manager',
'submit': 0, 'submit': 0,
@ -71,7 +71,6 @@
'cancel': 1, 'cancel': 1,
'create': 1, 'create': 1,
'doctype': 'DocPerm', 'doctype': 'DocPerm',
'idx': 2,
'permlevel': 0, 'permlevel': 0,
'role': 'Accounts Manager', 'role': 'Accounts Manager',
'submit': 1, 'submit': 1,
@ -84,7 +83,6 @@
'cancel': 1, 'cancel': 1,
'create': 1, 'create': 1,
'doctype': 'DocPerm', 'doctype': 'DocPerm',
'idx': 3,
'permlevel': 0, 'permlevel': 0,
'role': 'Accounts User', 'role': 'Accounts User',
'submit': 1, 'submit': 1,
@ -97,7 +95,6 @@
'cancel': 0, 'cancel': 0,
'create': 0, 'create': 0,
'doctype': 'DocPerm', 'doctype': 'DocPerm',
'idx': 4,
'permlevel': 1, 'permlevel': 1,
'role': 'Accounts User', 'role': 'Accounts User',
'submit': 0, 'submit': 0,
@ -106,18 +103,21 @@
# DocPerm # DocPerm
{ {
'amend': 0,
'cancel': 0,
'create': 0,
'doctype': 'DocPerm', 'doctype': 'DocPerm',
'idx': 5,
'match': 'customer', 'match': 'customer',
'permlevel': 0, 'permlevel': 0,
'role': 'Customer' 'role': 'Customer',
'submit': 0,
'write': 0
}, },
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Section Break', 'fieldtype': 'Section Break',
'idx': 1,
'label': 'Basic Info', 'label': 'Basic Info',
'oldfieldtype': 'Section Break', 'oldfieldtype': 'Section Break',
'permlevel': 0, 'permlevel': 0,
@ -128,7 +128,6 @@
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Column Break', 'fieldtype': 'Column Break',
'idx': 2,
'oldfieldtype': 'Column Break', 'oldfieldtype': 'Column Break',
'permlevel': 0, 'permlevel': 0,
'print_hide': 0, 'print_hide': 0,
@ -143,7 +142,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'naming_series', 'fieldname': 'naming_series',
'fieldtype': 'Select', 'fieldtype': 'Select',
'idx': 3,
'label': 'Series', 'label': 'Series',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'naming_series', 'oldfieldname': 'naming_series',
@ -159,7 +157,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'is_pos', 'fieldname': 'is_pos',
'fieldtype': 'Check', 'fieldtype': 'Check',
'idx': 4,
'label': 'Is POS', 'label': 'Is POS',
'oldfieldname': 'is_pos', 'oldfieldname': 'is_pos',
'oldfieldtype': 'Check', 'oldfieldtype': 'Check',
@ -174,7 +171,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'update_stock', 'fieldname': 'update_stock',
'fieldtype': 'Check', 'fieldtype': 'Check',
'idx': 5,
'label': 'Update Stock', 'label': 'Update Stock',
'oldfieldname': 'update_stock', 'oldfieldname': 'update_stock',
'oldfieldtype': 'Check', 'oldfieldtype': 'Check',
@ -189,7 +185,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'debit_to', 'fieldname': 'debit_to',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 6,
'in_filter': 1, 'in_filter': 1,
'label': 'Debit To', 'label': 'Debit To',
'oldfieldname': 'debit_to', 'oldfieldname': 'debit_to',
@ -209,7 +204,6 @@
'fieldname': 'customer', 'fieldname': 'customer',
'fieldtype': 'Link', 'fieldtype': 'Link',
'hidden': 0, 'hidden': 0,
'idx': 7,
'label': 'Customer', 'label': 'Customer',
'no_copy': 0, 'no_copy': 0,
'oldfieldname': 'customer', 'oldfieldname': 'customer',
@ -225,7 +219,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'customer_address', 'fieldname': 'customer_address',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 8,
'label': 'Customer Address', 'label': 'Customer Address',
'options': 'Address', 'options': 'Address',
'permlevel': 0, 'permlevel': 0,
@ -237,7 +230,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'contact_person', 'fieldname': 'contact_person',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 9,
'label': 'Contact Person', 'label': 'Contact Person',
'options': 'Contact', 'options': 'Contact',
'permlevel': 0, 'permlevel': 0,
@ -249,7 +241,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'customer_name', 'fieldname': 'customer_name',
'fieldtype': 'Data', 'fieldtype': 'Data',
'idx': 10,
'label': 'Name', 'label': 'Name',
'oldfieldname': 'customer_name', 'oldfieldname': 'customer_name',
'oldfieldtype': 'Data', 'oldfieldtype': 'Data',
@ -261,7 +252,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'address_display', 'fieldname': 'address_display',
'fieldtype': 'Small Text', 'fieldtype': 'Small Text',
'idx': 11,
'label': 'Address', 'label': 'Address',
'permlevel': 1 'permlevel': 1
}, },
@ -271,7 +261,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'contact_display', 'fieldname': 'contact_display',
'fieldtype': 'Small Text', 'fieldtype': 'Small Text',
'idx': 12,
'label': 'Contact', 'label': 'Contact',
'permlevel': 1 'permlevel': 1
}, },
@ -281,7 +270,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'contact_mobile', 'fieldname': 'contact_mobile',
'fieldtype': 'Text', 'fieldtype': 'Text',
'idx': 13,
'label': 'Mobile No', 'label': 'Mobile No',
'permlevel': 1 'permlevel': 1
}, },
@ -291,7 +279,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'contact_email', 'fieldname': 'contact_email',
'fieldtype': 'Text', 'fieldtype': 'Text',
'idx': 14,
'label': 'Contact Email', 'label': 'Contact Email',
'permlevel': 1, 'permlevel': 1,
'print_hide': 1 'print_hide': 1
@ -302,7 +289,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Column Break', 'fieldtype': 'Column Break',
'idx': 15,
'oldfieldtype': 'Column Break', 'oldfieldtype': 'Column Break',
'permlevel': 0 'permlevel': 0
}, },
@ -315,7 +301,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'voucher_date', 'fieldname': 'voucher_date',
'fieldtype': 'Date', 'fieldtype': 'Date',
'idx': 16,
'in_filter': 1, 'in_filter': 1,
'label': 'Voucher Date', 'label': 'Voucher Date',
'no_copy': 1, 'no_copy': 1,
@ -334,7 +319,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'due_date', 'fieldname': 'due_date',
'fieldtype': 'Date', 'fieldtype': 'Date',
'idx': 17,
'in_filter': 1, 'in_filter': 1,
'label': 'Due Date', 'label': 'Due Date',
'no_copy': 1, 'no_copy': 1,
@ -353,7 +337,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'posting_date', 'fieldname': 'posting_date',
'fieldtype': 'Date', 'fieldtype': 'Date',
'idx': 18,
'in_filter': 1, 'in_filter': 1,
'label': 'Posting Date', 'label': 'Posting Date',
'no_copy': 1, 'no_copy': 1,
@ -370,7 +353,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'posting_time', 'fieldname': 'posting_time',
'fieldtype': 'Time', 'fieldtype': 'Time',
'idx': 19,
'label': 'Posting Time', 'label': 'Posting Time',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'posting_time', 'oldfieldname': 'posting_time',
@ -385,7 +367,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'amendment_date', 'fieldname': 'amendment_date',
'fieldtype': 'Date', 'fieldtype': 'Date',
'idx': 20,
'label': 'Amendment Date', 'label': 'Amendment Date',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'amendment_date', 'oldfieldname': 'amendment_date',
@ -399,8 +380,8 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'amended_from', 'fieldname': 'amended_from',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 21,
'label': 'Amended From', 'label': 'Amended From',
'no_copy': 1,
'oldfieldname': 'amended_from', 'oldfieldname': 'amended_from',
'oldfieldtype': 'Link', 'oldfieldtype': 'Link',
'options': 'Receivable Voucher', 'options': 'Receivable Voucher',
@ -413,7 +394,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'mode_of_payment', 'fieldname': 'mode_of_payment',
'fieldtype': 'Select', 'fieldtype': 'Select',
'idx': 22,
'label': 'Mode of Payment', 'label': 'Mode of Payment',
'oldfieldname': 'mode_of_payment', 'oldfieldname': 'mode_of_payment',
'oldfieldtype': 'Select', 'oldfieldtype': 'Select',
@ -426,7 +406,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'territory', 'fieldname': 'territory',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 23,
'in_filter': 1, 'in_filter': 1,
'label': 'Territory', 'label': 'Territory',
'options': 'Territory', 'options': 'Territory',
@ -441,14 +420,12 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'customer_group', 'fieldname': 'customer_group',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 24,
'in_filter': 1, 'in_filter': 1,
'label': 'Customer Group', 'label': 'Customer Group',
'options': 'Customer Group', 'options': 'Customer Group',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
'reqd': 1, 'search_index': 0
'search_index': 1
}, },
# DocField # DocField
@ -456,7 +433,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Section Break', 'fieldtype': 'Section Break',
'idx': 25,
'label': 'Items', 'label': 'Items',
'oldfieldtype': 'Section Break', 'oldfieldtype': 'Section Break',
'permlevel': 0 'permlevel': 0
@ -467,7 +443,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'price_list_name', 'fieldname': 'price_list_name',
'fieldtype': 'Select', 'fieldtype': 'Select',
'idx': 26,
'label': 'Price List', 'label': 'Price List',
'oldfieldname': 'price_list_name', 'oldfieldname': 'price_list_name',
'oldfieldtype': 'Select', 'oldfieldtype': 'Select',
@ -484,7 +459,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'sales_order_main', 'fieldname': 'sales_order_main',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 27,
'label': 'Sales Order', 'label': 'Sales Order',
'oldfieldname': 'sales_order_main', 'oldfieldname': 'sales_order_main',
'oldfieldtype': 'Link', 'oldfieldtype': 'Link',
@ -500,7 +474,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'delivery_note_main', 'fieldname': 'delivery_note_main',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 28,
'label': 'Delivery Note', 'label': 'Delivery Note',
'oldfieldname': 'delivery_note_main', 'oldfieldname': 'delivery_note_main',
'oldfieldtype': 'Link', 'oldfieldtype': 'Link',
@ -513,7 +486,6 @@
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Button', 'fieldtype': 'Button',
'idx': 29,
'label': 'Get Items', 'label': 'Get Items',
'oldfieldtype': 'Button', 'oldfieldtype': 'Button',
'permlevel': 0, 'permlevel': 0,
@ -525,7 +497,6 @@
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Column Break', 'fieldtype': 'Column Break',
'idx': 30,
'permlevel': 0, 'permlevel': 0,
'width': '50%' 'width': '50%'
}, },
@ -535,7 +506,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'currency', 'fieldname': 'currency',
'fieldtype': 'Select', 'fieldtype': 'Select',
'idx': 31,
'label': 'Currency', 'label': 'Currency',
'oldfieldname': 'currency', 'oldfieldname': 'currency',
'oldfieldtype': 'Select', 'oldfieldtype': 'Select',
@ -551,7 +521,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'conversion_rate', 'fieldname': 'conversion_rate',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 32,
'label': 'Conversion Rate', 'label': 'Conversion Rate',
'oldfieldname': 'conversion_rate', 'oldfieldname': 'conversion_rate',
'oldfieldtype': 'Currency', 'oldfieldtype': 'Currency',
@ -564,7 +533,6 @@
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Section Break', 'fieldtype': 'Section Break',
'idx': 33,
'permlevel': 0 'permlevel': 0
}, },
@ -575,7 +543,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'entries', 'fieldname': 'entries',
'fieldtype': 'Table', 'fieldtype': 'Table',
'idx': 34,
'label': 'Entries', 'label': 'Entries',
'oldfieldname': 'entries', 'oldfieldname': 'entries',
'oldfieldtype': 'Table', 'oldfieldtype': 'Table',
@ -588,7 +555,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Button', 'fieldtype': 'Button',
'idx': 35,
'label': 'Re-Calculate Values', 'label': 'Re-Calculate Values',
'oldfieldtype': 'Button', 'oldfieldtype': 'Button',
'permlevel': 0, 'permlevel': 0,
@ -596,13 +562,27 @@
'trigger': 'Client' 'trigger': 'Client'
}, },
# DocField
{
'doctype': 'DocField',
'fieldtype': 'Section Break',
'permlevel': 0
},
# DocField
{
'doctype': 'DocField',
'fieldtype': 'Column Break',
'permlevel': 0,
'width': '50%'
},
# DocField # DocField
{ {
'description': 'Will be calculated automatically when you enter the details', 'description': 'Will be calculated automatically when you enter the details',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'net_total', 'fieldname': 'net_total',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 36,
'label': 'Net Total*', 'label': 'Net Total*',
'oldfieldname': 'net_total', 'oldfieldname': 'net_total',
'oldfieldtype': 'Currency', 'oldfieldtype': 'Currency',
@ -615,7 +595,6 @@
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'HTML', 'fieldtype': 'HTML',
'idx': 37,
'label': 'Rates HTML', 'label': 'Rates HTML',
'oldfieldtype': 'HTML', 'oldfieldtype': 'HTML',
'options': '* Rates in standard currency', 'options': '* Rates in standard currency',
@ -623,14 +602,6 @@
'print_hide': 1 'print_hide': 1
}, },
# DocField
{
'doctype': 'DocField',
'fieldtype': 'Section Break',
'idx': 38,
'permlevel': 0
},
# DocField # DocField
{ {
'colour': 'White:FFF', 'colour': 'White:FFF',
@ -638,7 +609,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'cash_bank_account', 'fieldname': 'cash_bank_account',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 39,
'label': 'Cash/Bank Account', 'label': 'Cash/Bank Account',
'oldfieldname': 'cash_bank_account', 'oldfieldname': 'cash_bank_account',
'oldfieldtype': 'Link', 'oldfieldtype': 'Link',
@ -654,7 +624,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'paid_amount', 'fieldname': 'paid_amount',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 40,
'label': 'Paid Amount', 'label': 'Paid Amount',
'oldfieldname': 'paid_amount', 'oldfieldname': 'paid_amount',
'oldfieldtype': 'Currency', 'oldfieldtype': 'Currency',
@ -667,7 +636,6 @@
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Column Break', 'fieldtype': 'Column Break',
'idx': 41,
'permlevel': 0, 'permlevel': 0,
'width': '50%' 'width': '50%'
}, },
@ -679,7 +647,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'write_off_account', 'fieldname': 'write_off_account',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 42,
'label': 'Write Off Account', 'label': 'Write Off Account',
'options': 'Account', 'options': 'Account',
'permlevel': 0, 'permlevel': 0,
@ -693,7 +660,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'write_off_cost_center', 'fieldname': 'write_off_cost_center',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 43,
'label': 'Write Off Cost Center', 'label': 'Write Off Cost Center',
'options': 'Cost Center', 'options': 'Cost Center',
'permlevel': 0, 'permlevel': 0,
@ -707,7 +673,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'write_off_amount', 'fieldname': 'write_off_amount',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 44,
'label': 'Write Off Amount', 'label': 'Write Off Amount',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1 'print_hide': 1
@ -717,7 +682,6 @@
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Section Break', 'fieldtype': 'Section Break',
'idx': 45,
'label': 'Taxes', 'label': 'Taxes',
'oldfieldtype': 'Section Break', 'oldfieldtype': 'Section Break',
'permlevel': 0 'permlevel': 0
@ -728,7 +692,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'charge', 'fieldname': 'charge',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 46,
'label': 'Charge', 'label': 'Charge',
'oldfieldname': 'charge', 'oldfieldname': 'charge',
'oldfieldtype': 'Link', 'oldfieldtype': 'Link',
@ -741,7 +704,6 @@
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Button', 'fieldtype': 'Button',
'idx': 47,
'label': 'Get Charges', 'label': 'Get Charges',
'oldfieldtype': 'Button', 'oldfieldtype': 'Button',
'permlevel': 0, 'permlevel': 0,
@ -756,7 +718,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'other_charges', 'fieldname': 'other_charges',
'fieldtype': 'Table', 'fieldtype': 'Table',
'idx': 48,
'label': 'Taxes1', 'label': 'Taxes1',
'oldfieldname': 'other_charges', 'oldfieldname': 'other_charges',
'oldfieldtype': 'Table', 'oldfieldtype': 'Table',
@ -764,24 +725,10 @@
'permlevel': 0 'permlevel': 0
}, },
# DocField
{
'doctype': 'DocField',
'fieldname': 'other_charges_total',
'fieldtype': 'Currency',
'idx': 49,
'label': 'Total Charges',
'oldfieldname': 'other_charges_total',
'oldfieldtype': 'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Button', 'fieldtype': 'Button',
'idx': 50,
'label': 'Calculate Charges', 'label': 'Calculate Charges',
'oldfieldtype': 'Button', 'oldfieldtype': 'Button',
'permlevel': 0, 'permlevel': 0,
@ -789,11 +736,22 @@
'trigger': 'Client' 'trigger': 'Client'
}, },
# DocField
{
'doctype': 'DocField',
'fieldname': 'other_charges_total',
'fieldtype': 'Currency',
'label': 'Total Charges',
'oldfieldname': 'other_charges_total',
'oldfieldtype': 'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField # DocField
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'HTML', 'fieldtype': 'HTML',
'idx': 51,
'label': 'Other Charges Calculation', 'label': 'Other Charges Calculation',
'oldfieldtype': 'HTML', 'oldfieldtype': 'HTML',
'permlevel': 0, 'permlevel': 0,
@ -805,7 +763,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Section Break', 'fieldtype': 'Section Break',
'idx': 52,
'label': 'Terms', 'label': 'Terms',
'oldfieldtype': 'Section Break', 'oldfieldtype': 'Section Break',
'permlevel': 0 'permlevel': 0
@ -816,7 +773,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'tc_name', 'fieldname': 'tc_name',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 53,
'label': 'Select Terms', 'label': 'Select Terms',
'oldfieldname': 'tc_name', 'oldfieldname': 'tc_name',
'oldfieldtype': 'Link', 'oldfieldtype': 'Link',
@ -830,7 +786,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Button', 'fieldtype': 'Button',
'idx': 54,
'label': 'Get Terms', 'label': 'Get Terms',
'oldfieldtype': 'Button', 'oldfieldtype': 'Button',
'options': 'get_tc_details', 'options': 'get_tc_details',
@ -844,7 +799,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'HTML', 'fieldtype': 'HTML',
'idx': 55,
'label': 'Terms HTML', 'label': 'Terms HTML',
'oldfieldtype': 'HTML', 'oldfieldtype': 'HTML',
'options': 'You can add Terms and Notes that will be printed in the Transaction', 'options': 'You can add Terms and Notes that will be printed in the Transaction',
@ -857,7 +811,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'terms', 'fieldname': 'terms',
'fieldtype': 'Text Editor', 'fieldtype': 'Text Editor',
'idx': 56,
'label': 'Term Details', 'label': 'Term Details',
'oldfieldname': 'terms', 'oldfieldname': 'terms',
'oldfieldtype': 'Text Editor', 'oldfieldtype': 'Text Editor',
@ -869,7 +822,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Section Break', 'fieldtype': 'Section Break',
'idx': 57,
'label': 'More Info', 'label': 'More Info',
'oldfieldtype': 'Section Break', 'oldfieldtype': 'Section Break',
'permlevel': 0, 'permlevel': 0,
@ -881,7 +833,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Column Break', 'fieldtype': 'Column Break',
'idx': 58,
'oldfieldtype': 'Column Break', 'oldfieldtype': 'Column Break',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
@ -895,7 +846,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'is_opening', 'fieldname': 'is_opening',
'fieldtype': 'Select', 'fieldtype': 'Select',
'idx': 59,
'in_filter': 1, 'in_filter': 1,
'label': 'Is Opening', 'label': 'Is Opening',
'oldfieldname': 'is_opening', 'oldfieldname': 'is_opening',
@ -912,7 +862,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'aging_date', 'fieldname': 'aging_date',
'fieldtype': 'Date', 'fieldtype': 'Date',
'idx': 60,
'label': 'Aging Date', 'label': 'Aging Date',
'oldfieldname': 'aging_date', 'oldfieldname': 'aging_date',
'oldfieldtype': 'Date', 'oldfieldtype': 'Date',
@ -927,7 +876,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'letter_head', 'fieldname': 'letter_head',
'fieldtype': 'Select', 'fieldtype': 'Select',
'idx': 61,
'label': 'Letter Head', 'label': 'Letter Head',
'oldfieldname': 'letter_head', 'oldfieldname': 'letter_head',
'oldfieldtype': 'Select', 'oldfieldtype': 'Select',
@ -941,7 +889,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'source', 'fieldname': 'source',
'fieldtype': 'Select', 'fieldtype': 'Select',
'idx': 62,
'label': 'Source', 'label': 'Source',
'oldfieldname': 'source', 'oldfieldname': 'source',
'oldfieldtype': 'Select', 'oldfieldtype': 'Select',
@ -957,7 +904,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'campaign', 'fieldname': 'campaign',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 63,
'label': 'Campaign', 'label': 'Campaign',
'oldfieldname': 'campaign', 'oldfieldname': 'campaign',
'oldfieldtype': 'Link', 'oldfieldtype': 'Link',
@ -973,7 +919,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'select_print_heading', 'fieldname': 'select_print_heading',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 64,
'label': 'Select Print Heading', 'label': 'Select Print Heading',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'select_print_heading', 'oldfieldname': 'select_print_heading',
@ -992,7 +937,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'project_name', 'fieldname': 'project_name',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 65,
'in_filter': 1, 'in_filter': 1,
'label': 'Project Name', 'label': 'Project Name',
'oldfieldname': 'project_name', 'oldfieldname': 'project_name',
@ -1008,7 +952,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Column Break', 'fieldtype': 'Column Break',
'idx': 66,
'oldfieldtype': 'Column Break', 'oldfieldtype': 'Column Break',
'permlevel': 0 'permlevel': 0
}, },
@ -1018,7 +961,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'company', 'fieldname': 'company',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 67,
'in_filter': 1, 'in_filter': 1,
'label': 'Company', 'label': 'Company',
'oldfieldname': 'company', 'oldfieldname': 'company',
@ -1035,7 +977,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'fiscal_year', 'fieldname': 'fiscal_year',
'fieldtype': 'Select', 'fieldtype': 'Select',
'idx': 68,
'in_filter': 1, 'in_filter': 1,
'label': 'Fiscal Year', 'label': 'Fiscal Year',
'no_copy': 0, 'no_copy': 0,
@ -1055,7 +996,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'cancel_reason', 'fieldname': 'cancel_reason',
'fieldtype': 'Data', 'fieldtype': 'Data',
'idx': 69,
'label': 'Cancel Reason', 'label': 'Cancel Reason',
'oldfieldname': 'cancel_reason', 'oldfieldname': 'cancel_reason',
'oldfieldtype': 'Data', 'oldfieldtype': 'Data',
@ -1068,7 +1008,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'remarks', 'fieldname': 'remarks',
'fieldtype': 'Small Text', 'fieldtype': 'Small Text',
'idx': 70,
'label': 'Remarks', 'label': 'Remarks',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'remarks', 'oldfieldname': 'remarks',
@ -1083,7 +1022,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Section Break', 'fieldtype': 'Section Break',
'idx': 71,
'label': 'Totals', 'label': 'Totals',
'oldfieldtype': 'Section Break', 'oldfieldtype': 'Section Break',
'permlevel': 0, 'permlevel': 0,
@ -1095,7 +1033,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Column Break', 'fieldtype': 'Column Break',
'idx': 72,
'oldfieldtype': 'Column Break', 'oldfieldtype': 'Column Break',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
@ -1108,7 +1045,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'grand_total', 'fieldname': 'grand_total',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 73,
'in_filter': 1, 'in_filter': 1,
'label': 'Grand Total', 'label': 'Grand Total',
'oldfieldname': 'grand_total', 'oldfieldname': 'grand_total',
@ -1124,7 +1060,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'rounded_total', 'fieldname': 'rounded_total',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 74,
'label': 'Rounded Total', 'label': 'Rounded Total',
'oldfieldname': 'rounded_total', 'oldfieldname': 'rounded_total',
'oldfieldtype': 'Currency', 'oldfieldtype': 'Currency',
@ -1139,7 +1074,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'in_words', 'fieldname': 'in_words',
'fieldtype': 'Data', 'fieldtype': 'Data',
'idx': 75,
'label': 'In Words', 'label': 'In Words',
'oldfieldname': 'in_words', 'oldfieldname': 'in_words',
'oldfieldtype': 'Data', 'oldfieldtype': 'Data',
@ -1152,7 +1086,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'total_advance', 'fieldname': 'total_advance',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 76,
'label': 'Total Advance', 'label': 'Total Advance',
'oldfieldname': 'total_advance', 'oldfieldname': 'total_advance',
'oldfieldtype': 'Currency', 'oldfieldtype': 'Currency',
@ -1166,7 +1099,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'outstanding_amount', 'fieldname': 'outstanding_amount',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 77,
'label': 'Outstanding Amount', 'label': 'Outstanding Amount',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'outstanding_amount', 'oldfieldname': 'outstanding_amount',
@ -1180,7 +1112,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Column Break', 'fieldtype': 'Column Break',
'idx': 78,
'oldfieldtype': 'Column Break', 'oldfieldtype': 'Column Break',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
@ -1192,7 +1123,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'grand_total_export', 'fieldname': 'grand_total_export',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 79,
'label': 'Grand Total (Export)', 'label': 'Grand Total (Export)',
'oldfieldname': 'grand_total_export', 'oldfieldname': 'grand_total_export',
'oldfieldtype': 'Currency', 'oldfieldtype': 'Currency',
@ -1206,7 +1136,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'rounded_total_export', 'fieldname': 'rounded_total_export',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 80,
'label': 'Rounded Total (Export)', 'label': 'Rounded Total (Export)',
'oldfieldname': 'rounded_total_export', 'oldfieldname': 'rounded_total_export',
'oldfieldtype': 'Currency', 'oldfieldtype': 'Currency',
@ -1221,7 +1150,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'in_words_export', 'fieldname': 'in_words_export',
'fieldtype': 'Data', 'fieldtype': 'Data',
'idx': 81,
'label': 'In Words (Export)', 'label': 'In Words (Export)',
'oldfieldname': 'in_words_export', 'oldfieldname': 'in_words_export',
'oldfieldtype': 'Data', 'oldfieldtype': 'Data',
@ -1234,7 +1162,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'gross_profit', 'fieldname': 'gross_profit',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 82,
'label': 'Gross Profit', 'label': 'Gross Profit',
'oldfieldname': 'gross_profit', 'oldfieldname': 'gross_profit',
'oldfieldtype': 'Currency', 'oldfieldtype': 'Currency',
@ -1247,7 +1174,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'gross_profit_percent', 'fieldname': 'gross_profit_percent',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 83,
'label': 'Gross Profit (%)', 'label': 'Gross Profit (%)',
'oldfieldname': 'gross_profit_percent', 'oldfieldname': 'gross_profit_percent',
'oldfieldtype': 'Currency', 'oldfieldtype': 'Currency',
@ -1260,7 +1186,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Section Break', 'fieldtype': 'Section Break',
'idx': 84,
'label': 'Advances', 'label': 'Advances',
'oldfieldtype': 'Section Break', 'oldfieldtype': 'Section Break',
'permlevel': 0, 'permlevel': 0,
@ -1271,7 +1196,6 @@
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Button', 'fieldtype': 'Button',
'idx': 85,
'label': 'Get Advances Received', 'label': 'Get Advances Received',
'oldfieldtype': 'Button', 'oldfieldtype': 'Button',
'options': 'get_advances', 'options': 'get_advances',
@ -1284,7 +1208,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'advance_adjustment_details', 'fieldname': 'advance_adjustment_details',
'fieldtype': 'Table', 'fieldtype': 'Table',
'idx': 86,
'label': 'Advance Adjustment Detail', 'label': 'Advance Adjustment Detail',
'oldfieldname': 'advance_adjustment_details', 'oldfieldname': 'advance_adjustment_details',
'oldfieldtype': 'Table', 'oldfieldtype': 'Table',
@ -1297,7 +1220,6 @@
{ {
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Section Break', 'fieldtype': 'Section Break',
'idx': 87,
'label': 'Sales Team', 'label': 'Sales Team',
'oldfieldtype': 'Section Break', 'oldfieldtype': 'Section Break',
'permlevel': 0, 'permlevel': 0,
@ -1309,7 +1231,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Column Break', 'fieldtype': 'Column Break',
'idx': 88,
'oldfieldtype': 'Column Break', 'oldfieldtype': 'Column Break',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
@ -1321,7 +1242,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'sales_partner', 'fieldname': 'sales_partner',
'fieldtype': 'Link', 'fieldtype': 'Link',
'idx': 89,
'in_filter': 1, 'in_filter': 1,
'label': 'Sales Partner', 'label': 'Sales Partner',
'oldfieldname': 'sales_partner', 'oldfieldname': 'sales_partner',
@ -1337,7 +1257,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'commission_rate', 'fieldname': 'commission_rate',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 90,
'label': 'Commission Rate (%)', 'label': 'Commission Rate (%)',
'oldfieldname': 'commission_rate', 'oldfieldname': 'commission_rate',
'oldfieldtype': 'Currency', 'oldfieldtype': 'Currency',
@ -1352,7 +1271,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'total_commission', 'fieldname': 'total_commission',
'fieldtype': 'Currency', 'fieldtype': 'Currency',
'idx': 91,
'label': 'Total Commission', 'label': 'Total Commission',
'oldfieldname': 'total_commission', 'oldfieldname': 'total_commission',
'oldfieldtype': 'Currency', 'oldfieldtype': 'Currency',
@ -1366,7 +1284,6 @@
'colour': 'White:FFF', 'colour': 'White:FFF',
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Column Break', 'fieldtype': 'Column Break',
'idx': 92,
'oldfieldtype': 'Column Break', 'oldfieldtype': 'Column Break',
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
@ -1378,7 +1295,6 @@
'doctype': 'DocField', 'doctype': 'DocField',
'fieldname': 'sales_team', 'fieldname': 'sales_team',
'fieldtype': 'Table', 'fieldtype': 'Table',
'idx': 93,
'label': 'Sales Team1', 'label': 'Sales Team1',
'oldfieldname': 'sales_team', 'oldfieldname': 'sales_team',
'oldfieldtype': 'Table', 'oldfieldtype': 'Table',
@ -1392,7 +1308,6 @@
'allow_on_submit': 1, 'allow_on_submit': 1,
'doctype': 'DocField', 'doctype': 'DocField',
'fieldtype': 'Button', 'fieldtype': 'Button',
'idx': 94,
'label': 'Repair Outstanding Amt', 'label': 'Repair Outstanding Amt',
'oldfieldtype': 'Button', 'oldfieldtype': 'Button',
'options': 'repair_rv_outstanding', 'options': 'repair_rv_outstanding',
@ -1406,7 +1321,6 @@
'fieldname': 'against_income_account', 'fieldname': 'against_income_account',
'fieldtype': 'Small Text', 'fieldtype': 'Small Text',
'hidden': 1, 'hidden': 1,
'idx': 95,
'label': 'Against Income Account', 'label': 'Against Income Account',
'no_copy': 1, 'no_copy': 1,
'oldfieldname': 'against_income_account', 'oldfieldname': 'against_income_account',