Pman.Dialog.XtupleRecvGrp.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 2 Dec 2013 02:48:39 +0000 (10:48 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 2 Dec 2013 02:48:39 +0000 (10:48 +0800)
Pman.Dialog.XtupleRecvGrp.js

Pman.Dialog.XtupleRecvGrp.bjs
Pman.Dialog.XtupleRecvGrp.js

index 209c180..fae2b59 100644 (file)
@@ -1,9 +1,9 @@
 {
-    "id": "roo-file-23",
+    "id": "roo-file-336",
     "name": "Pman.Dialog.XtupleRecvGrp",
     "parent": "",
     "title": "",
-    "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleRecvGrp.bjs",
+    "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleRecvGrp.bjs",
     "items": [
         {
             "closable": false,
                     "xtype": "Button",
                     "|xns": "Roo"
                 },
+                {
+                    "listeners": {
+                        "click": "function (_self, e)\n{\n    if (!_this.form.findField('recvgrp_id').getValue()) {\n        Roo.MessageBox.alert(\"Error\", \"Can not void this as it has not been saved\");\n        return;\n    }\n   \n     if (1 * _this.form.findField('recvgrp_void').getValue()) {\n        Roo.MessageBox.alert(\"Error\", \"This record is already void.\");\n        return;\n    }\n    new Pman.Request({\n        mask : 'Voiding',\n        method : 'POST',\n        url : baseURL + '/Roo/Recvgrp',\n        params : {\n            recvgrp_id : _this.form.findField('recvgrp_id').getValue(),\n            _void : 1\n        },\n        success : function() {\n              if (_this.callback) {\n                _this.callback.call(_this, _this.form.getValues());\n             }\n            _this.dialog.hide();\n        }\n    });\n    \n   \n\n}"
+                    },
+                    "*prop": "buttons[]",
+                    "text": "VOID",
+                    "xtype": "Button",
+                    "|xns": "Roo"
+                },
                 {
                     "listeners": {
                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
index f973a46..a43b47a 100644 (file)
@@ -1125,6 +1125,43 @@ Pman.Dialog.XtupleRecvGrp = {
                             
                            
                         
+                        }
+                    },
+                    text : "VOID"
+                },
+                {
+                    xtype: 'Button',
+                    xns: Roo,
+                    listeners : {
+                        click : function (_self, e)
+                        {
+                            if (!_this.form.findField('recvgrp_id').getValue()) {
+                                Roo.MessageBox.alert("Error", "Can not void this as it has not been saved");
+                                return;
+                            }
+                           
+                             if (1 * _this.form.findField('recvgrp_void').getValue()) {
+                                Roo.MessageBox.alert("Error", "This record is already void.");
+                                return;
+                            }
+                            new Pman.Request({
+                                mask : 'Voiding',
+                                method : 'POST',
+                                url : baseURL + '/Roo/Recvgrp',
+                                params : {
+                                    recvgrp_id : _this.form.findField('recvgrp_id').getValue(),
+                                    _void : 1
+                                },
+                                success : function() {
+                                      if (_this.callback) {
+                                        _this.callback.call(_this, _this.form.getValues());
+                                     }
+                                    _this.dialog.hide();
+                                }
+                            });
+                            
+                           
+                        
                         }
                     },
                     text : "VOID"