fixes in accounts
This commit is contained in:
parent
a0f6a3eab7
commit
a202f00dc0
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -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']))
|
||||
|
@ -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']},
|
||||
|
File diff suppressed because one or more lines are too long
@ -823,7 +823,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;i<fl.length;i++){var key=fl[i].fieldname;var v=doc[key];if(fl[i].reqd&&is_null(v)&&fl[i].fieldname){errfld[errfld.length]=fl[i].label;if(cur_frm){var f=cur_frm.fields_dict[fl[i].fieldname];if(f){if(f.set_as_error)f.set_as_error(1);if(!cur_frm.error_in_section&&f.parent_section){cur_frm.set_section(f.parent_section.sec_id);cur_frm.error_in_section=1;}}}
|
||||
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;i<fl.length;i++){var key=fl[i].fieldname;var v=doc[key];if(fl[i].reqd&&is_null(v)&&fl[i].fieldname){errfld[errfld.length]=fl[i].label;if(cur_frm){var f=cur_frm.fields_dict[fl[i].fieldname];if(f){if(f.set_as_error)f.set_as_error(1);if(!cur_frm.error_in_section&&f.parent_section){cur_frm.error_in_section=1;}}}
|
||||
if(all_clear)all_clear=false;}}
|
||||
if(errfld.length)msgprint('<b>Mandatory fields required in '+
|
||||
(doc.parenttype?(fields[doc.parenttype][doc.parentfield].label+' (Table)'):get_doctype_label(doc.doctype))+':</b>\n'+errfld.join('\n'));return all_clear;}
|
||||
|
@ -1 +1 @@
|
||||
1684
|
||||
1694
|
Loading…
x
Reference in New Issue
Block a user