},
success : function(res) {
// update the items and tax values...?
- _this.form.findField('cmhead_value').setValue(res.data.cmhead_value);
+
+ _this.form.findField('cmhead_taxfree_value').setValue(res.data.cmhead_taxfree_value);
_this.form.findField('cmhead_tax_value').setValue(res.data.cmhead_tax_value * 1);
_this.form.findField('cmhead_taxable_value').setValue(res.data.cmhead_taxable_value * 1);
- _this.form.findField('cmhead_misc_per').update();
+ _this.form.findField('cmhead_misc_per').update();
_this.form.findField('cmhead_total').recalc();
}
allowDecimals : true,
cls : 'roo-align-right',
decimalPrecision : 3,
- fieldLabel : 'Items Value',
- name : 'cmhead_value',
+ fieldLabel : 'Taxable Value',
+ name : 'cmhead_taxable_value',
+ readOnly : true,
+ width : 100
+ },
+ {
+ xtype: 'NumberField',
+ xns: Roo.form,
+ allowDecimals : true,
+ cls : 'roo-align-right',
+ decimalPrecision : 3,
+ fieldLabel : 'Tax Free Value',
+ name : 'cmhead_taxfree_value',
readOnly : true,
width : 100
}
width : 35,
update : function() {
var m = _this.form.findField('cmhead_misc_per');
- var pv = parseFloat(_this.form.findField('cmhead_value').getValue());
+ var pv = parseFloat(_this.form.findField('cmhead_taxfree_value').getValue()) +
+ parseFloat(_this.form.findField('cmhead_taxable_value').getValue()) ;
var discount = parseFloat(_this.form.findField('cmhead_misc').getValue());
if (discount > 0.0) {
recalc : function() {
var vals = _this.form.getValues();
this.setValue(
- (1*vals.cmhead_value) + (1*vals.cmhead_freight) + (1*vals.cmhead_tax_value) + (1*vals.cmhead_misc)
+ (1*vals.cmhead_taxable_value) +
+ (1*vals.cmhead_taxfree_value) +
+ (1*vals.cmhead_freight) +
+ (1*vals.cmhead_tax_value) +
+ (1*vals.cmhead_misc)
);
}
}
xns: Roo.form,
name : 'cmhead_billto_addr_id'
},
- {
- xtype: 'Hidden',
- xns: Roo.form,
- name : 'cmhead_taxable_value'
- },
{
xtype: 'Hidden',
xns: Roo.form,