commit-gnue
[Top][All Lists]
Advanced

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

r117 - hotline/forms


From: kilo
Subject: r117 - hotline/forms
Date: Wed, 17 Nov 2004 15:35:06 -0600 (CST)

Author: kilo
Date: 2004-11-17 15:35:05 -0600 (Wed, 17 Nov 2004)
New Revision: 117

Modified:
   hotline/forms/hotline-en.gfd
Log:
Hotline
Synchronised English version with German one.

Modified: hotline/forms/hotline-en.gfd
===================================================================
--- hotline/forms/hotline-en.gfd        2004-11-17 10:30:09 UTC (rev 116)
+++ hotline/forms/hotline-en.gfd        2004-11-17 21:35:05 UTC (rev 117)
@@ -63,6 +63,21 @@
     </staticset>
   </datasource>
 
+  <datasource name="dtsOpenTickets" connection="hotline"
+    table="hotline_ticket">
+    <condition>
+      <or>
+        <ne>
+          <cfield name="hotline_status"/>
+          <cconst value="E"/>
+        </ne>
+        <null>
+          <cfield name="hotline_status"/>
+        </null>
+      </or>
+    </condition>
+  </datasource>
+
   <trigger type="On-Activation">
     # When activating the Form it tries to load to correct
     # contributor
@@ -82,8 +97,10 @@
       # This trigger tries to find a customer number based on the actual word
       # in the customer (Kunde) field
       import mx.DateTime
-      value    = blkSelect.fldKunde.get ()
-      selected = False
+      value     = blkSelect.fldKunde.get ()
+      selected  = False
+      selTicket = True
+      updGrund  = True
 
       if len (value):
         # customer number entered?
@@ -100,7 +117,19 @@
           # Matchcode unambiguous?
           if dtsCustomer.count () == 1:
             selected = True
+      else:
+        res = dtsOpenTickets.createResultSet ()
+        if res.getRecordCount ():
+          params = {'ticket': None, 'kunde': None}
+          activateDialog ('selectTicket', params, 1)
+          if params.get ('ticket') is not None:
+            dtsCustomer.simpleQuery ({'gnue_id': params ['kunde']})
+            dtsTicket.simpleQuery ({'gnue_id': params ['ticket']})
 
+            selected  = True
+            selTicket = False
+            updGrund  = False
+
       # Ambiguous Matchcode or empty entry
       if not selected:
         params = {'matchcode': blkSelect.fldKunde.get () or ''}
@@ -119,12 +148,11 @@
       setFocus (blkTicket.fldKontakt)
 
       # Are there open tickets for this customer?
-      updGrund = True
-      if blkCustomer.fldOffene.get ():
+      if selTicket and blkCustomer.fldOffene.get ():
         # Yes: Selection dialog opened
-        params = {'kunde': blkCustomer.fldKundeId.get ()}
+        params = {'kunde': blkCustomer.fldKundeId.get (), 'ticket': None}
         activateDialog ('selectTicket', params, 1)
-        if params.has_key ('ticket'):
+        if params.get ('ticket'):
           dtsTicket.simpleQuery ({'gnue_id': params ['ticket']})
           updGrund = False
 
@@ -239,8 +267,13 @@
       <field name="fldHotlineTelefax" field="hotline_telefax" max_length="25"/>
       <field name="fldHotlineTelefon" field="hotline_telefon" max_length="25"/>
     </block>
+
+    <block name="blkOpenTickets" datasource="dtsOpenTickets">
+      <field name="fldStatus" field="hotline_status" max_length="1" />
+    </block>
   </logic>
 
+
   <layout xmlns:c="GNUe:Layout:Char" c:height="20" c:width="79" tabbed="top">
     <page name="Hotline">
       <label c:height="1" c:width="12" c:x="2" c:y="1"  text="Contributor:"/>
@@ -255,7 +288,8 @@
       <label c:height="1" c:width="8"  c:x="2" c:y="10" text="Problem:"/>
 
       <entry name="inpMitarbeiter" c:height="1" c:width="35" c:x="14" c:y="1"
-        block="blkSelect" field="fldMitarbeiter" style="dropdown"/>
+        block="blkSelect" field="fldMitarbeiter" style="dropdown"
+        focusorder="1"/>
       <entry name="inpKunde" c:height="1" c:width="17" c:x="14" c:y="2"
         block="blkSelect" field="fldKunde"/>
       <button name="btnKunde" c:height="1" c:width="10" c:x="65" c:y="2"
@@ -318,7 +352,7 @@
   <!-- Dialog for choosing a customer                                    -->
   <!-- ================================================================= -->
 
-  <dialog xmlns:c="GNUe:Layout:Char" name="selectKunde">
+  <dialog xmlns:c="GNUe:Layout:Char" name="selectKunde" title="Select 
customer">
     <trigger type="On-Startup">
       form.setFeature ('GUI:MENUBAR:SUPPRESS', True)
       form.setFeature ('GUI:TOOLBAR:SUPPRESS', True)
@@ -344,23 +378,26 @@
       </block>
     </logic>
 
-    <layout xmlns:c="GNUe:Layout:Char" c:width="65" c:height="15">
+    <layout xmlns:c="GNUe:Layout:Char" c:width="66" c:height="15">
       <page>
-        <label c:x="0"  c:y="0" c:width="6" c:height="1" text="Number"   />
-        <label c:x="11" c:y="0" c:width="9" c:height="1" text="Matchcode"/>
-        <label c:x="29" c:y="0" c:width="6" c:height="1" text="Name-1"   />
+        <label c:x="1"  c:y="0" c:width="6" c:height="1" text="Number"   />
+        <label c:x="12" c:y="0" c:width="9" c:height="1" text="Matchcode"/>
+        <label c:x="30" c:y="0" c:width="6" c:height="1" text="Name-1"   />
 
-        <entry c:x="0"  c:y="1" c:width="10" block="blk" field="fldNummer"   />
-        <entry c:x="11" c:y="1" c:width="17" block="blk" field="fldMatchcode"/>
-        <entry c:x="29" c:y="1" c:width="35" block="blk" field="fldName1"    />
+        <entry c:x="1"  c:y="1" c:width="10" block="blk" field="fldNummer"
+          focusorder="1" />
+        <entry c:x="12" c:y="1" c:width="17" block="blk" field="fldMatchcode"
+          navigable="False"/>
+        <entry c:x="30" c:y="1" c:width="35" block="blk" field="fldName1"
+          navigable="False"/>
 
-        <button c:x="0" c:y="14" c:width="10" c:height="1" label="Ok">
+        <button c:x="1" c:y="14" c:width="10" c:height="1" label="Ok">
           <trigger name="Ok" type="On-Action">
             setParameter ('nummer', blk.fldNummer.get ())
             close ()
           </trigger>
         </button>
-        <button c:x="11" c:y="14" c:width="10" c:height="1" label="Cancel">
+        <button c:x="12" c:y="14" c:width="10" c:height="1" label="Cancel">
           <trigger name="Cancel" type="On-Action">
             close ()
           </trigger>
@@ -374,7 +411,8 @@
   <!-- Dialog to select a Call for a customer                            -->
   <!-- ================================================================= -->
 
-  <dialog xmlns:c="GNUe:Layout:Char" name="selectTicket">
+  <dialog xmlns:c="GNUe:Layout:Char" name="selectTicket"
+    title="Select open ticket">
     <trigger type="On-Startup">
       form.setFeature('GUI:MENUBAR:SUPPRESS', 1)
       form.setFeature('GUI:TOOLBAR:SUPPRESS', 1)
@@ -384,8 +422,10 @@
     <trigger type="On-Activation">
       kunde = getParameter ('kunde')
       if kunde:
+        form.setTitle ('Select open ticket of customer')
         dts.simpleQuery ({'hotline_kontakt.hotline_kunde': kunde})
       else:
+        form.setTitle ('Select open ticket')
         dts.simpleQuery ({})
     </trigger>
 
@@ -411,26 +451,32 @@
         <field name="fldText"    field="hotline_text"   readonly="Y"/>
         <field name="fldKontakt" field="hotline_kontakt.hotline_name"
           readonly="Y"/>
+        <field name="fldKunde" field="hotline_kontakt.hotline_kunde"
+          readonly="Y" />
       </block>
     </logic>
 
-    <layout xmlns:c="GNUe:Layout:Char" c:width="75" c:height="15">
+    <layout xmlns:c="GNUe:Layout:Char" c:width="76" c:height="15">
       <page>
-        <label c:x="0"  c:y="0" c:width="7" c:height="1" text="Contact"/>
-        <label c:x="20" c:y="0" c:width="6" c:height="1" text="Text"   />
-        <label c:x="68" c:y="0" c:width="6" c:height="1" text="Status" />
+        <label c:x="1"  c:y="0" c:width="7" c:height="1" text="Contact"/>
+        <label c:x="21" c:y="0" c:width="6" c:height="1" text="Text"   />
+        <label c:x="69" c:y="0" c:width="6" c:height="1" text="Status" />
 
-        <entry c:x="0"  c:y="1" c:width="19" block="blk" field="fldKontakt"/>
-        <entry c:x="20" c:y="1" c:width="50" block="blk" field="fldText"   />
-        <entry c:x="71" c:y="1" c:width="3"  block="blk" field="fldStatus" />
+        <entry c:x="1"  c:y="1" c:width="19" block="blk" field="fldKontakt"
+          focusorder="1" />
+        <entry c:x="21" c:y="1" c:width="50" block="blk" field="fldText"
+          navigable="False"/>
+        <entry c:x="72" c:y="1" c:width="3"  block="blk" field="fldStatus"
+          navigable="False"/>
 
-        <button c:x="0" c:y="14" c:width="10" c:height="1" label="Ok">
+        <button c:x="1" c:y="14" c:width="10" c:height="1" label="Ok">
           <trigger name="Ok" type="On-Action">
             setParameter ('ticket', blk.fldId.get ())
+            setParameter ('kunde', blk.fldCustomer.get ())
             close ()
           </trigger>
         </button>
-        <button c:x="11" c:y="14" c:width="10" c:height="1" label="Cancel">
+        <button c:x="12" c:y="14" c:width="10" c:height="1" label="Cancel">
           <trigger name="Cancel" type="On-Action">
             close ()
           </trigger>





reply via email to

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