commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r147 - in gnue-invoice: . forms


From: kilo
Subject: r147 - in gnue-invoice: . forms
Date: Wed, 1 Dec 2004 04:36:50 -0600 (CST)

Author: kilo
Date: 2004-12-01 04:36:49 -0600 (Wed, 01 Dec 2004)
New Revision: 147

Added:
   gnue-invoice/forms/util.gfd
Modified:
   gnue-invoice/forms/INV_Head.gfd
   gnue-invoice/forms/INV_PaymentMethod.gfd
   gnue-invoice/forms/ITEM_Item.gfd
   gnue-invoice/forms/ITEM_ItemType.gfd
   gnue-invoice/forms/ITEM_UnitType.gfd
   gnue-invoice/forms/LOC_Address.gfd
   gnue-invoice/forms/LOC_Country.gfd
   gnue-invoice/forms/LOC_Region.gfd
   gnue-invoice/forms/LOC_Street.gfd
   gnue-invoice/forms/LOC_Zip.gfd
   gnue-invoice/forms/PARTY_Party.gfd
   gnue-invoice/forms/TAX_Vat.gfd
   gnue-invoice/news
Log:
GNUe Invoice.
Make use of trigger imports.

Modified: gnue-invoice/forms/INV_Head.gfd
===================================================================
--- gnue-invoice/forms/INV_Head.gfd     2004-11-30 13:34:30 UTC (rev 146)
+++ gnue-invoice/forms/INV_Head.gfd     2004-12-01 10:36:49 UTC (rev 147)
@@ -48,30 +48,7 @@
               table="ITEM_Item"/>
   <datasource name="dtsITEM_Item" connection="invoice" table="ITEM_Item"/>
 
-  <!--*****************************************************
-                      Named triggers
-  ******************************************************-->
-  <trigger name="calcDueDate" type="NAMED">
-    blkINV_Head.call("INV_calcDateDue", {})
-  </trigger>
 
-  <trigger name="saveAll" type="NAMED">
-    if not blkINV_Item.isSaved():
-      print "Item not saved, saving..."
-      blkINV_Item.commit()
-    if not blkINV_Head.isSaved():
-      print "Head not saved, saving..."
-      blkINV_Head.commit()
-    close()
-  </trigger>
-
-  <trigger name="revertAll" type="NAMED">
-    blkINV_Item.rollback()
-    blkINV_Head.rollback()
-    close()
-  </trigger>
-
-
   <logic>
     <!--***************************************************
                         Invoice head
@@ -124,8 +101,9 @@
         <trigger type="POST-CHANGE" name="onchange">
           #Calling a calculated property will cause it to refresh
           blkINV_Item.call("INV_getvalueGross", {})
-          #blkINV_Item.fldInvValueGross.get()
           blkINV_Head.call("INV_getvalueTotalGross", {})
+          #blkINV_Item.update()
+          #blkINV_Head.update()
         </trigger>
       </field>
       <field name="fldInvUnit" field="INV_product"
@@ -251,4 +229,28 @@
     </page>
   </layout>
 
+
+  <!--*****************************************************
+                      Named triggers
+  ******************************************************-->
+  <trigger name="calcDueDate" type="NAMED">
+    blkINV_Head.call("INV_calcDateDue", {})
+  </trigger>
+
+  <trigger name="saveAll" type="NAMED">
+    if not blkINV_Item.isSaved():
+      print "Item not saved, saving..."
+      blkINV_Item.commit()
+    if not blkINV_Head.isSaved():
+      print "Head not saved, saving..."
+      blkINV_Head.commit()
+    close()
+  </trigger>
+
+  <trigger name="revertAll" type="NAMED">
+    blkINV_Item.rollback()
+    blkINV_Head.rollback()
+    close()
+  </trigger>
+
 </form>

Modified: gnue-invoice/forms/INV_PaymentMethod.gfd
===================================================================
--- gnue-invoice/forms/INV_PaymentMethod.gfd    2004-11-30 13:34:30 UTC (rev 
146)
+++ gnue-invoice/forms/INV_PaymentMethod.gfd    2004-12-01 10:36:49 UTC (rev 
147)
@@ -26,11 +26,8 @@
 <form style="dialog" xmlns:c="GNUe:Layout:Char" title="Payment Method">
   <options/>
 
-  <trigger type="On-Activation">
-    match = getParameter('id')
-    if match:
-      dts.simpleQuery({'gnue_id': match})
-  </trigger>
+  <import-trigger name='startupSearch' library='util.gfd'/>
+  <trigger name='OnActivation' type='On-Activation' src='startupSearch'/>
 
   <datasource name="dts" connection="invoice" table="INV_PaymentMethod"/>
 

Modified: gnue-invoice/forms/ITEM_Item.gfd
===================================================================
--- gnue-invoice/forms/ITEM_Item.gfd    2004-11-30 13:34:30 UTC (rev 146)
+++ gnue-invoice/forms/ITEM_Item.gfd    2004-12-01 10:36:49 UTC (rev 147)
@@ -26,11 +26,8 @@
 <form style="dialog" xmlns:c="GNUe:Layout:Char" title="Item">
   <options/>
 
-  <trigger type="On-Activation">
-    match = getParameter('id')
-    if match:
-      dts.simpleQuery({'gnue_id': match})
-  </trigger>
+  <import-trigger name='startupSearch' library='util.gfd'/>
+  <trigger name='OnActivation' type='On-Activation' src='startupSearch'/>
 
   <datasource name="dts" connection="invoice" table="ITEM_Item"/>
   <datasource name="dts_ITEM_ItemType" connection="invoice" prequery="Y"

Modified: gnue-invoice/forms/ITEM_ItemType.gfd
===================================================================
--- gnue-invoice/forms/ITEM_ItemType.gfd        2004-11-30 13:34:30 UTC (rev 
146)
+++ gnue-invoice/forms/ITEM_ItemType.gfd        2004-12-01 10:36:49 UTC (rev 
147)
@@ -26,11 +26,8 @@
 <form style="dialog" xmlns:c="GNUe:Layout:Char" title="Item type">
   <options/>
 
-  <trigger type="On-Activation">
-    match = getParameter('id')
-    if match:
-      dts.simpleQuery({'gnue_id': match})
-  </trigger>
+  <import-trigger name='startupSearch' library='util.gfd'/>
+  <trigger name='OnActivation' type='On-Activation' src='startupSearch'/>
 
   <datasource name="dts" connection="invoice" table="ITEM_ItemType"/>
 

Modified: gnue-invoice/forms/ITEM_UnitType.gfd
===================================================================
--- gnue-invoice/forms/ITEM_UnitType.gfd        2004-11-30 13:34:30 UTC (rev 
146)
+++ gnue-invoice/forms/ITEM_UnitType.gfd        2004-12-01 10:36:49 UTC (rev 
147)
@@ -26,11 +26,8 @@
 <form style="dialog" xmlns:c="GNUe:Layout:Char" title="UnitType">
   <options/>
 
-  <trigger type="On-Activation">
-    match = getParameter('id')
-    if match:
-      dts.simpleQuery({'gnue_id': match})
-  </trigger>
+  <import-trigger name='startupSearch' library='util.gfd'/>
+  <trigger name='OnActivation' type='On-Activation' src='startupSearch'/>
 
   <datasource name="dts" connection="invoice" table="ITEM_UnitType"/>
 

Modified: gnue-invoice/forms/LOC_Address.gfd
===================================================================
--- gnue-invoice/forms/LOC_Address.gfd  2004-11-30 13:34:30 UTC (rev 146)
+++ gnue-invoice/forms/LOC_Address.gfd  2004-12-01 10:36:49 UTC (rev 147)
@@ -26,11 +26,8 @@
 <form style="dialog" xmlns:c="GNUe:Layout:Char" title="Address">
   <options/>
 
-  <trigger type="On-Activation">
-    match = getParameter('id')
-    if match:
-      dts.simpleQuery({'gnue_id': match})
-  </trigger>
+  <import-trigger name='startupSearch' library='util.gfd'/>
+  <trigger name='OnActivation' type='On-Activation' src='startupSearch'/>
 
   <datasource name="dts" connection="invoice" table="LOC_Address"/>
   <datasource name="dts_LOC_Zip" connection="invoice" prequery="Y"

Modified: gnue-invoice/forms/LOC_Country.gfd
===================================================================
--- gnue-invoice/forms/LOC_Country.gfd  2004-11-30 13:34:30 UTC (rev 146)
+++ gnue-invoice/forms/LOC_Country.gfd  2004-12-01 10:36:49 UTC (rev 147)
@@ -26,11 +26,8 @@
 <form style="dialog" xmlns:c="GNUe:Layout:Char" title="Country">
   <options/>
   
-  <trigger type="On-Activation">
-    match = getParameter('id')
-    if match:
-      dts.simpleQuery({'gnue_id': match})
-  </trigger>
+  <import-trigger name='startupSearch' library='util.gfd'/>
+  <trigger name='OnActivation' type='On-Activation' src='startupSearch'/>
 
   <datasource name="dts" connection="invoice" table="LOC_Country"/>
   
@@ -47,15 +44,15 @@
       <label name="lblCode:" c:height="1" c:width="4" c:x="1" c:y="1"
           text="Code:"/>
       <entry name="entCode" c:height="1" c:width="3" c:x="9" c:y="1"
-          block="blk" field="fldLocCode" focusorder="1" label=""/>
+          block="blk" field="fldLocCode" focusorder="1"/>
       <label name="lblName:" c:height="1" c:width="4" c:x="1" c:y="2"
           text="Name:"/>
       <entry name="entName" c:height="1" c:width="30" c:x="9" c:y="2"
-          block="blk" field="fldLocName" focusorder="2" label=""/>
+          block="blk" field="fldLocName" focusorder="2"/>
       <label name="lblPhone:" c:height="1" c:width="4" c:x="1" c:y="3"
           text="Phone:"/>
       <entry name="entPhone" c:height="1" c:width="4" c:x="9" c:y="3"
-          block="blk" field="fldLocPhone" focusorder="3" label=""/>
+          block="blk" field="fldLocPhone" focusorder="3"/>
     </page>
   </layout>
   

Modified: gnue-invoice/forms/LOC_Region.gfd
===================================================================
--- gnue-invoice/forms/LOC_Region.gfd   2004-11-30 13:34:30 UTC (rev 146)
+++ gnue-invoice/forms/LOC_Region.gfd   2004-12-01 10:36:49 UTC (rev 147)
@@ -26,11 +26,8 @@
 <form style="dialog" xmlns:c="GNUe:Layout:Char" title="Region">
   <options/>
 
-  <trigger type="On-Activation">
-    match = getParameter('id')
-    if match:
-      dts.simpleQuery({'gnue_id': match})
-  </trigger>
+  <import-trigger name='startupSearch' library='util.gfd'/>
+  <trigger name='OnActivation' type='On-Activation' src='startupSearch'/>
 
   <datasource name="dts" connection="invoice" table="LOC_Region"/>
   <datasource name="dts_LOC_Country" connection="invoice" prequery="Y"

Modified: gnue-invoice/forms/LOC_Street.gfd
===================================================================
--- gnue-invoice/forms/LOC_Street.gfd   2004-11-30 13:34:30 UTC (rev 146)
+++ gnue-invoice/forms/LOC_Street.gfd   2004-12-01 10:36:49 UTC (rev 147)
@@ -26,11 +26,8 @@
 <form style="dialog" xmlns:c="GNUe:Layout:Char" title="Street names">
   <options/>
   
-  <trigger type="On-Activation">
-    match = getParameter('id')
-    if match:
-      dts.simpleQuery({'gnue_id': match})
-  </trigger>
+  <import-trigger name='startupSearch' library='util.gfd'/>
+  <trigger name='OnActivation' type='On-Activation' src='startupSearch'/>
 
   <datasource name="dts" connection="invoice" table="LOC_Street"/>
   

Modified: gnue-invoice/forms/LOC_Zip.gfd
===================================================================
--- gnue-invoice/forms/LOC_Zip.gfd      2004-11-30 13:34:30 UTC (rev 146)
+++ gnue-invoice/forms/LOC_Zip.gfd      2004-12-01 10:36:49 UTC (rev 147)
@@ -26,11 +26,8 @@
 <form style="dialog" xmlns:c="GNUe:Layout:Char" title="Postal Code">
   <options/>
 
-  <trigger type="On-Activation">
-    match = getParameter('id')
-    if match:
-      dts.simpleQuery({'gnue_id': match})
-  </trigger>
+  <import-trigger name='startupSearch' library='util.gfd'/>
+  <trigger name='OnActivation' type='On-Activation' src='startupSearch'/>
 
   <datasource name="dts" connection="invoice" table="LOC_Zip"/>
   <datasource name="dts_LOC_Region" connection="invoice" prequery="Y"

Modified: gnue-invoice/forms/PARTY_Party.gfd
===================================================================
--- gnue-invoice/forms/PARTY_Party.gfd  2004-11-30 13:34:30 UTC (rev 146)
+++ gnue-invoice/forms/PARTY_Party.gfd  2004-12-01 10:36:49 UTC (rev 147)
@@ -26,11 +26,8 @@
 <form style="dialog" xmlns:c="GNUe:Layout:Char" title="Party">
   <options/>
 
-  <trigger type="On-Activation">
-    match = getParameter('id')
-    if match:
-      dts.simpleQuery({'gnue_id': match})
-  </trigger>
+  <import-trigger name='startupSearch' library='util.gfd'/>
+  <trigger name='OnActivation' type='On-Activation' src='startupSearch'/>
 
   <datasource name="dts" connection="invoice" table="PARTY_Party"/>
   <datasource name="dts_LOC_Address" connection="invoice" prequery="Y"

Modified: gnue-invoice/forms/TAX_Vat.gfd
===================================================================
--- gnue-invoice/forms/TAX_Vat.gfd      2004-11-30 13:34:30 UTC (rev 146)
+++ gnue-invoice/forms/TAX_Vat.gfd      2004-12-01 10:36:49 UTC (rev 147)
@@ -26,11 +26,8 @@
 <form style="dialog" xmlns:c="GNUe:Layout:Char" title="VAT">
   <options/>
 
-  <trigger type="On-Activation">
-    match = getParameter('id')
-    if match:
-      dts.simpleQuery({'gnue_id': match})
-  </trigger>
+  <import-trigger name='startupSearch' library='util.gfd'/>
+  <trigger name='OnActivation' type='On-Activation' src='startupSearch'/>
 
   <datasource name="dts" connection="invoice" table="TAX_Vat"/>
 

Added: gnue-invoice/forms/util.gfd
===================================================================
--- gnue-invoice/forms/util.gfd 2004-11-30 13:34:30 UTC (rev 146)
+++ gnue-invoice/forms/util.gfd 2004-12-01 10:36:49 UTC (rev 147)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="iso8859-1"?>
+
+<!-- Utility form, placeholder for importable triggers
+
+     Copyright 2004 Free Software Foundation
+
+     This file is part of GNU Enterprise.
+
+     GNU Enterprise is free software; you can redistribute it and/or
+     modify it under the terms of the GNU General Public License as
+     published by the Free Software Foundation; either version 2 of
+     the License, or (at your option) any later version.
+
+     GNU Enterprise is distributed in the hope that it will be useful,
+     but WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+     GNU General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with GNU Enterprise; see the file COPYING.  If not, write to
+     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+
+     $Id$ -->
+
+<form title="util">
+
+  <trigger name='startupSearch' type='NAMED'>
+    match = getParameter('id')
+    if match:
+      dts.simpleQuery({'gnue_id': match})
+  </trigger>
+
+  <logic>
+    <block name="foo" />
+  </logic>
+  <layout>
+    <page/>
+  </layout>
+  
+</form>


Property changes on: gnue-invoice/forms/util.gfd
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: gnue-invoice/news
===================================================================
--- gnue-invoice/news   2004-11-30 13:34:30 UTC (rev 146)
+++ gnue-invoice/news   2004-12-01 10:36:49 UTC (rev 147)
@@ -2,6 +2,9 @@
 *************************
 GNUe Invoice - Project CV
 *************************
+New features / changes by 2004.12.01
+* Make use of importing triggers.
+
 New features / changes by 2004.11.30
 * Edited the GSD files that fill up the test database, because it did not
     contain zip codes, city names and regions...





reply via email to

[Prev in Thread] Current Thread [Next in Thread]