diff --git a/css/all-app.css b/css/all-app.css index 71c83340d9..f13ef93997 100644 --- a/css/all-app.css +++ b/css/all-app.css @@ -334,7 +334,7 @@ div.notice { div.form-title { /*background-color: #e0eeff;*/ - padding: 5px 11px 15px 11px; + padding: 5px 19px 15px 19px; margin: -15px -15px 0px -15px; border-bottom: 1px solid #eee; } @@ -342,7 +342,7 @@ div.form-title { div.form-section-head { margin: 11px -15px 3px -15px; border-top: 1px solid #ccc; - padding: 11px 15px 0px 15px; + padding: 11px 23px 0px 23px; } div.form-layout-row:first-child .form-section-head { diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 11239d595d..f880eb7ecf 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -334,10 +334,9 @@ cur_frm.cscript.tax_code = function(doc, dt, dn) { } /* ***************************** UTILITY FUNCTIONS ************************ */ - // Calculate Advance // ------------------ -var calc_total_advance = function(doc,cdt,cdn) { +calc_total_advance = function(doc,cdt,cdn) { var doc = locals[doc.doctype][doc.name]; var el = getchildren('Purchase Invoice Advance',doc.name,'advance_allocation_details') var tot_tds=0; diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 6c956a0dae..1878526b61 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -193,9 +193,14 @@ class DocType(TransactionBase): item = webnotes.conn.sql("select default_income_account, default_sales_cost_center, default_warehouse from tabItem where name = '%s'" %(args['item_code']), as_dict=1) - ret['income_account'] = item and item[0]['default_income_account'] or dtl and dtl[0]['income_account'] or args['income_account'] - ret['cost_center'] = item and item[0]['default_sales_cost_center'] or dtl and dtl[0]['cost_center'] or args['cost_center'] - ret['warehouse'] = item and item[0]['default_warehouse'] or dtl and dtl[0]['warehouse'] or args['warehouse'] + ret['income_account'] = item and item[0].get('default_income_account') \ + or (dtl and dtl[0].get('income_account') or args.get('income_account')) + + ret['cost_center'] = item and item[0].get('default_sales_cost_center') \ + or (dtl and dtl[0].get('cost_center') or args.get('cost_center')) + + ret['warehouse'] = item and item[0].get('default_warehouse') \ + or (dtl and dtl[0].get('warehouse') or args.get('warehouse')) if ret['warehouse']: actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (args['item_code'], ret['warehouse'])) diff --git a/erpnext/startup/js/feature_setup.js b/erpnext/startup/js/feature_setup.js index b929a7cec6..f7fdb26d50 100644 --- a/erpnext/startup/js/feature_setup.js +++ b/erpnext/startup/js/feature_setup.js @@ -30,10 +30,10 @@ pscript.feature_dict = { 'fs_projects': { 'BOM': {'fields':['project_name']}, 'Delivery Note': {'fields':['project_name']}, - 'Purchase Invoice': {'fields':['project_name']}, + 'Purchase Invoice': {'entries':['project_name']}, 'Production Order': {'fields':['project_name']}, - 'Purchase Order': {'fields':['project_name']}, - 'Purchase Receipt': {'fields':['project_name']}, + 'Purchase Order': {'po_details':['project_name']}, + 'Purchase Receipt': {'purchase_receipt_details':['project_name']}, 'Sales Invoice': {'fields':['project_name']}, 'Sales Order': {'fields':['project_name']}, 'Stock Entry': {'fields':['project_name']}, diff --git a/js/all-app.js b/js/all-app.js index f715dc09b6..8a68431997 100644 --- a/js/all-app.js +++ b/js/all-app.js @@ -1283,7 +1283,7 @@ all_clear=tmp;}} var _save=function(){$c('webnotes.widgets.form.save.savedocs',{'docs':compress_doclist(doclist),'docname':dn,'action':save_action,'user':user},function(r,rtxt){if(f){f.savingflag=false;} if(r.saved){if(onsave)onsave(r);}else{if(onerr)onerr(r);}},function(){if(f){f.savingflag=false;}},0,(f?'Saving...':''));} if(doc.__islocal&&(doctype&&doctype.autoname&&doctype.autoname.toLowerCase()=='prompt')){var newname=prompt('Enter the name of the new '+dt,'');if(newname){doc.__newname=strip(newname);_save();}else{msgprint('Not Saved');onerr();}}else{_save();}} -function check_required(dt,dn,parent_dt){var doc=locals[dt][dn];if(doc.docstatus>1)return true;var fl=fields_list[dt];if(!fl)return true;var all_clear=true;var errfld=[];for(var i=0;i1)return true;var fl=fields_list[dt];if(!fl)return true;var all_clear=true;var errfld=[];for(var i=0;iMandatory fields required in '+ (doc.parenttype?(fields[doc.parenttype][doc.parentfield].label+' (Table)'):get_doctype_label(doc.doctype))+':\n'+errfld.join('\n'));return all_clear;} @@ -2234,7 +2234,7 @@ if(user_roles.indexOf("System Manager")!=-1){$('.navbar .modules').append('
  • 1)return true;var fl=fields_list[dt];if(!fl)return true;var all_clear=true;var errfld=[];for(var i=0;i1)return true;var fl=fields_list[dt];if(!fl)return true;var all_clear=true;var errfld=[];for(var i=0;iMandatory fields required in '+ (doc.parenttype?(fields[doc.parenttype][doc.parentfield].label+' (Table)'):get_doctype_label(doc.doctype))+':\n'+errfld.join('\n'));return all_clear;} diff --git a/version.num b/version.num index d32d224a22..1291917b26 100644 --- a/version.num +++ b/version.num @@ -1 +1 @@ -1684 \ No newline at end of file +1694 \ No newline at end of file