Pman.Dialog.XtupleCreditMemo.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 28 Jan 2014 04:28:18 +0000 (12:28 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 28 Jan 2014 04:28:18 +0000 (12:28 +0800)
Pman.Dialog.XtupleCreditMemo.js

Pman.Dialog.XtupleCreditMemo.bjs
Pman.Dialog.XtupleCreditMemo.js

index ca27767..e22dc82 100644 (file)
@@ -29,7 +29,7 @@
                 },
                 {
                     "listeners": {
-                        "activate": "function (_self)\n{\n    // we need to reload to find out the subtotal.\n    if (!_this.data || !_this.data.cmhead_id) {\n        return;\n    }\n    \n    new Pman.Request({\n        method : 'GET',\n        url : baseURL + '/Roo/cmhead',\n        params : { \n            _id : _this.data.cmhead_id\n        },\n        success : function(res) {\n            // update the items and tax values...?\n            _this.form.findField('cmhead_value').setValue(res.data.cmhead_value);\n            _this.form.findField('cmhead_tax_value').setValue(res.data.cmhead_tax_value * 1);            \n            _this.form.findField('cmhead_taxable_value').setValue(res.data.cmhead_taxable_value * 1);  \n             _this.form.findField('cmhead_misc_per').update();\n            _this.form.findField('cmhead_total').recalc();\n        \n        }\n    });\n}"
+                        "activate": "function (_self)\n{\n    // we need to reload to find out the subtotal.\n    if (!_this.data || !_this.data.cmhead_id) {\n        return;\n    }\n    \n    new Pman.Request({\n        method : 'GET',\n        url : baseURL + '/Roo/cmhead',\n        params : { \n            _id : _this.data.cmhead_id\n        },\n        success : function(res) {\n            // update the items and tax values...?\n\n            _this.form.findField('cmhead_taxfree_value').setValue(res.data.cmhead_taxfree_value);\n            _this.form.findField('cmhead_tax_value').setValue(res.data.cmhead_tax_value * 1);            \n            _this.form.findField('cmhead_taxable_value').setValue(res.data.cmhead_taxable_value * 1);  \n            _this.form.findField('cmhead_misc_per').update();\n            _this.form.findField('cmhead_total').recalc();\n        \n        }\n    });\n}"
                     },
                     "region": "center",
                     "title": "Credit Details",
index b98dba3..264ab5d 100644 (file)
@@ -62,10 +62,11 @@ Pman.Dialog.XtupleCreditMemo = {
                                 },
                                 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();
                                 
                                 }