Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Dialog.XtupleTerms.js
index 1b8a475..ad646c4 100644 (file)
@@ -40,11 +40,11 @@ Pman.Dialog.XtupleTerms = {
             collapsible : false,
             title : "Create / Edit Terms",
             xtype : 'LayoutDialog',
-            width : 500,
+            width : 550,
             xns : Roo,
             closable : false,
             resizable : false,
-            height : 550,
+            height : 300,
             buttons : [
                 {
                        '|xns' : 'Roo',
@@ -86,10 +86,11 @@ Pman.Dialog.XtupleTerms = {
                        {
                             '|xns' : 'Roo.form',
                             url : baseURL + '/Roo/terms.php',
-                            method : 'POST',
                             xtype : 'Form',
+                            method : 'POST',
                             style : 'margin:10px;',
                             xns : Roo.form,
+                            labelWidth : 150,
                             listeners : {
                                actioncomplete : function(_self,action)
                                   {
@@ -124,102 +125,77 @@ Pman.Dialog.XtupleTerms = {
                             items : [
                                {
                                     '|xns' : 'Roo.form',
-                                    style : 'width:420px',
-                                    xtype : 'FieldSet',
-                                    legend : "Details",
+                                    fieldLabel : 'Code',
+                                    xtype : 'TextField',
+                                    allowBlank : false,
+                                    width : 300,
                                     xns : Roo.form,
-                                    items : [
-                                       {
-                                            '|xns' : 'Roo.form',
-                                            fieldLabel : 'First Name',
-                                            xtype : 'TextField',
-                                            allowBlank : false,
-                                            width : 300,
-                                            xns : Roo.form,
-                                            name : 'cntct_first_name'
-                                        },
-                                       {
-                                            '|xns' : 'Roo.form',
-                                            fieldLabel : 'Last Name',
-                                            xtype : 'TextField',
-                                            width : 300,
-                                            xns : Roo.form,
-                                            name : 'cntct_last_name'
-                                        },
-                                       {
-                                            '|xns' : 'Roo.form',
-                                            fieldLabel : 'Phone',
-                                            xtype : 'TextField',
-                                            regex : /^[0-9 +-]+$/,
-                                            width : 300,
-                                            xns : Roo.form,
-                                            name : 'cntct_phone'
-                                        },
-                                       {
-                                            '|xns' : 'Roo.form',
-                                            fieldLabel : 'Alt',
-                                            xtype : 'TextField',
-                                            regex : /^[0-9 +-]+$/,
-                                            width : 300,
-                                            xns : Roo.form,
-                                            name : 'cntct_phone2'
-                                        },
-                                       {
-                                            '|xns' : 'Roo.form',
-                                            allowBlank : false,
-                                            fieldLabel : 'Email',
-                                            vtype : 'email',
-                                            xtype : 'TextField',
-                                            width : 300,
-                                            xns : Roo.form,
-                                            name : 'cntct_email'
-                                        },
-                                       {
-                                            '|xns' : 'Roo.form',
-                                            fieldLabel : 'Password',
-                                            xtype : 'TextField',
-                                            inputType : 'password',
-                                            width : 300,
-                                            xns : Roo.form,
-                                            name : 'password'
-                                        },
-                                       {
-                                            '|xns' : 'Roo.form',
-                                            fieldLabel : 'Confirm PW',
-                                            xtype : 'TextField',
-                                            inputType : 'password',
-                                            width : 300,
-                                            xns : Roo.form,
-                                            name : 'password2'
-                                        },
-                                       {
-                                            '|xns' : 'Roo.form',
-                                            checked : true,
-                                            fieldLabel : 'Active',
-                                            xtype : 'Checkbox',
-                                            valueOff : 0,
-                                            xns : Roo.form,
-                                            inputValue : true,
-                                            name : 'cntct_active'
-                                        }
-                                    ]
-
+                                    name : 'terms_code'
+                                },
+                               {
+                                    '|xns' : 'Roo.form',
+                                    fieldLabel : 'Description',
+                                    width : 300,
+                                    xtype : 'TextArea',
+                                    xns : Roo.form,
+                                    name : 'terms_descrip'
                                 },
                                {
                                     '|xns' : 'Roo.form',
-                                    fieldLabel : 'Code',
-                                    xtype : 'TextField',
                                     allowBlank : false,
+                                    fieldLabel : 'Due Days',
+                                    allowDecimals : true,
+                                    xtype : 'NumberField',
+                                    decimalPrecision : 0,
                                     width : 300,
                                     xns : Roo.form,
-                                    name : 'terms_code'
+                                    value : 0,
+                                    name : 'terms_duedays',
+                                    minValue : 0
                                 },
                                {
                                     '|xns' : 'Roo.form',
-                                    xtype : 'Hidden',
-                                    value : "D",
+                                    fieldLabel : 'Discount Day',
+                                    allowDecimals : true,
+                                    xtype : 'NumberField',
+                                    decimalPrecision : 0,
+                                    width : 300,
+                                    xns : Roo.form,
+                                    value : 0,
+                                    name : 'terms_discdays',
+                                    minValue : 0
+                                },
+                               {
+                                    '|xns' : 'Roo.form',
+                                    fieldLabel : 'Cut Off Day',
+                                    xtype : 'NumberField',
+                                    allowDecimals : true,
+                                    decimalPrecision : 0,
+                                    width : 300,
+                                    xns : Roo.form,
+                                    value : 0,
+                                    name : 'terms_cutoffday',
+                                    minValue : 0
+                                },
+                               {
+                                    '|xns' : 'Roo.form',
+                                    checked : true,
+                                    fieldLabel : 'Used in Payables',
+                                    xtype : 'Checkbox',
+                                    valueOff : 0,
+                                    xns : Roo.form,
+                                    inputValue : true,
+                                    name : 'terms_ap'
+                                },
+                               {
+                                    '|xns' : 'Roo.form',
+                                    checked : true,
+                                    fieldLabel : 'Used in Receivables',
+                                    xtype : 'Checkbox',
+                                    valueOff : 0,
                                     xns : Roo.form,
-                                    name : 'terms_type'
+                                    inputValue : true,
+                                    name : 'terms_ar'
                                 },
                                {
                                     '|xns' : 'Roo.form',