/[papo]/papo/forms/ownPos.neb
ViewVC logotype

Diff of /papo/forms/ownPos.neb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mhepp, Mon May 5 23:12:36 2003 UTC revision 1.4 by mhepp, Tue May 6 20:01:19 2003 UTC
# Line 132  Line 132 
132      if editBlock:      if editBlock:
133          #busco el punto de venta          #busco el punto de venta
134          ownPosBlock.initQuery()          ownPosBlock.initQuery()
135          ownPosBlock.ownPosEntityIdEntry = str(editBlock.posEntityIdEntry)          ownPosBlock.ownPosEntityIdEntry = str(editBlock.posEntityIdEntry)
136          ownPosBlock.processQuery()          ownPosBlock.processQuery()
137          #busco entity_relation          #busco entity_relation
138          entityRelationBlock.initQuery()          entityRelationBlock.initQuery()
# Line 141  Line 141 
141          entityRelationBlock.processQuery()          entityRelationBlock.processQuery()
142          #busco relation_types          #busco relation_types
143          relationTypesBlock.initQuery()          relationTypesBlock.initQuery()
144          relationTypesBlock.entityRelationEntry = str(entityRelationBlock.entityRelationIdEntry)          relationTypesBlock.entityRelationEntry = str(entityRelationBlock.entityRelationIdEntry)
145          relationTypesBlock.relationTypeEntry = <neb:Inline>'"'.PAPO::posOfType.'"'</neb:Inline>          relationTypesBlock.relationTypeEntry = <neb:Inline>'"'.PAPO::posOfType.'"'</neb:Inline>
146          relationTypesBlock.processQuery()          relationTypesBlock.processQuery()
147      #el id del branch al que pertenece      #le cargo el nombre de branch y de organization
148      entityRelationBlock.entityRelationFromEntry = str(masterBlock.branchIdEntry)      docOrgBlock.ownBranchNameEntry = str(masterBlock.branchNameEntry)
     #le cargo el nombre de branch y de organization      
     documentsPosBlock.ownBranchNameEntry = str(masterBlock.branchNameEntry)  
149      orgDataSource.createResultSet()      orgDataSource.createResultSet()
150      ownBranchBlock.ownBranchNameEntry = str(masterBlock.branchNameEntry)      ownBranchBlock.ownBranchNameEntry = str(masterBlock.branchNameEntry)
151      documentsPosBlock.organizationNameEntry =str(ownBranchBlock.organizationNameEntry)      docOrgBlock.organizationNameEntry =str(ownBranchBlock.organizationNameEntry)
152     </trigger>     </trigger>
153    
154    
155    <trigger name="commitTrigger" type="NAMED">    <trigger name="commitTrigger" type="NAMED">
156    if ownPosBlock.getCurrentRecord().isInserted():    if ownPosBlock.getCurrentRecord().isInserted():
157        masterBlock = getParameter ('master')  
158      print "Poniendo Nuevo"      print "Poniendo Nuevo"
159      ownPosBlock.commit()      ownPosBlock.commit()
160      #cargo el tipo      #cargo el tipo
161      entityTypesBlock.ownPosEntityEntry = str(ownPosBlock.ownPosEntityIdEntry)      entityTypesBlock.ownPosEntityEntry = str(ownPosBlock.ownPosEntityIdEntry)
162      entityTypesBlock.ownPosEntityTypeEntry = <neb:Inline>'"'.PAPO::ownPosType.'"'</neb:Inline>      entityTypesBlock.ownPosEntityTypeEntry = <neb:Inline>'"'.PAPO::ownPosType.'"'</neb:Inline>
163      #cargo la entity_relation      #cargo la entity_relation y el id del branch al que pertenece
164        entityRelationBlock.entityRelationFromEntry = str(masterBlock.branchIdEntry)
165      entityRelationBlock.entityRelationToEntry = str(ownPosBlock.ownPosEntityIdEntry)      entityRelationBlock.entityRelationToEntry = str(ownPosBlock.ownPosEntityIdEntry)
166      ownPosBlock.commit()      ownPosBlock.commit()
167      #cargo relation_types      #cargo relation_types
# Line 182  Line 182 
182    <trigger name="ownPosRollbackTrigger" type="NAMED">    <trigger name="ownPosRollbackTrigger" type="NAMED">
183      import hack      import hack
184      hack.rollback(ownPosBlock)      hack.rollback(ownPosBlock)
185      hack.rollback(entityRelationBlock)      </trigger>
186      <trigger name="posDocRollbackTrigger" type="NAMED">
187        import hack
188        hack.rollback(ownPosBlock)
189        hack.rollback(posDocBlock)
190    </trigger>    </trigger>
191    
192    
193    
194    <trigger type="ON-EXIT">    <trigger type="ON-EXIT">
195      func= getParameter('callback')      func= getParameter('callback')
196      func()      func()
# Line 196  Line 203 
203        <block name="ownBranchBlock" datasource="orgDataSource">        <block name="ownBranchBlock" datasource="orgDataSource">
204          <label text="organización"   x="1" y="1" />          <label text="organización"   x="1" y="1" />
205          <label text="sucursal" x="40" y="1" />          <label text="sucursal" x="40" y="1" />
206          <entry name="organizationNameEntry" x="1" y="2" field="_entity_data.name" width="40" />          <entry name="organizationNameEntry" x="1" y="2" field="_entity_data.name" width="40"
207          <entry name="ownBranchNameEntry" x="40" y="2" width="40" />            style="label" />
208            <entry name="ownBranchNameEntry" x="40" y="2" width="40" style="label"/>
209        </block>        </block>
210      </box>      </box>
211      <!--abm-->      <!--abm-->
212      <box label="Punto de venta" x="0" y="4" height="18" width="84">      <box label="Punto de venta" x="0" y="4" height="18" width="84">
213      <block name="ownPosBlock" datasource="ownPosDataSource" restrictInsert="y" transparentBlock="y">      <block name="ownPosBlock" datasource="ownPosDataSource" restrictInsert="y" transparentBlock="y">
214        <entry name="ownPosEntityIdEntry" field="entity.id"  x="70" y="9" width="10" />        <entry name="ownPosEntityIdEntry" field="entity.id"  x="70" y="9" width="10" hidden="" />
215        <label text="Nombre" x="1" y="1"/>        <label text="Nombre" x="1" y="1"/>
216        <label text="Número" x="1" y="3"/>        <label text="Número" x="1" y="3"/>
217        <label text="Stock por factura" x="1" y="6"/>        <label text="Stock por factura" x="1" y="6"/>
218        <entry name="numberEntry" field="_own_pos_data.number" x="1" y="4" width="10"/>        <entry name="numberEntry" field="_own_pos_data.number" x="1" y="4" width="10"/>
219        <entry name="nameEntry" field="_entity_data.name" x="1" y="2" width="40"/>        <entry name="nameEntry" field="_entity_data.name" x="1" y="2" width="40"/>
220        <entry name="StockByInvoiceEntry" field="_own_pos_data.stock_by_invoice" x="20" y="6" width="2" default="1" />        <entry name="StockByInvoiceEntry" field="_own_pos_data.stock_by_invoice" x="20" y="6" width="2" default="1"/>
221        <label text="Observaciones" x="1" y="7"/>        <label text="Observaciones" x="1" y="7"/>
222        <entry name="obs" field="_entity_data.observations" x="1" y="8" width="25" height="7"/>        <entry name="obs" field="_entity_data.observations" x="1" y="8" width="25" height="7"/>
223        <button x="1" y="15" trigger="commitTrigger" width="9" label="Aceptar" name="ownPosCommitBtn" height="1"/>          <button x="1" y="15" trigger="commitTrigger" width="9" label="Aceptar" name="ownPosCommitBtn" height="1"/>  
224        <button x="21" y="15" trigger="ownPosRollbackTrigger" width="9" label="Cancelar" name="ownPosRollbackBtn" height="1"/>        <button x="21" y="15" trigger="ownPosRollbackTrigger" width="9" label="Cancelar" name="ownPosRollbackBtn" height="1"/>
225      </block>      </block>
226      </box>      </box>
227      <block name="entityTypesBlock" datasource="entityTypesDataSource" >      <block name="entityTypesBlock" datasource="entityTypesDataSource" >
# Line 224  Line 232 
232      </block>      </block>
233      <!--entity relation-->      <!--entity relation-->
234      <block name="entityRelationBlock" datasource="entityRelationDataSource" >      <block name="entityRelationBlock" datasource="entityRelationDataSource" >
235        <entry name="entityRelationIdEntry" field="entity_relation.id" x="70" y="1"  />        <entry name="entityRelationIdEntry" field="entity_relation.id" x="70" y="1" hidden="" />
236        <entry name="entityRelationToEntry" field="_entity_relation_data.entity_to" x="70" y="2"  />            <entry name="entityRelationToEntry" field="_entity_relation_data.entity_to" x="70" y="2" hidden="" />    
237        <entry name="entityRelationFromEntry" field="_entity_relation_data.entity_from" x="70" y="3" />        <entry name="entityRelationFromEntry" field="_entity_relation_data.entity_from" x="70" y="3" hidden="" />
238      </block>      </block>
239      <!--relation_types-->      <!--relation_types-->
240      <block name="relationTypesBlock" datasource="relationTypesDataSource" >      <block name="relationTypesBlock" datasource="relationTypesDataSource" >
241        <entry name="relationTypeEntry" field="_relation_types_data.relation_type" x="70" y="5"  />            <entry name="relationTypeEntry" field="_relation_types_data.relation_type" x="70" y="5" hidden="" />    
242        <entry name="entityRelationEntry" field="_relation_types_data.entity_relation" x="70" y="6" />        <entry name="entityRelationEntry" field="_relation_types_data.entity_relation" x="70" y="6" hidden=""/>
243      </block>      </block>
244      <!--/entity relation-->      <!--/entity relation-->
245    </page>    </page>
# Line 246  Line 254 
254              <cfield name="own_pos_document.id"/>              <cfield name="own_pos_document.id"/>
255              <cfield name="_own_pos_document_data._table"/>              <cfield name="_own_pos_document_data._table"/>
256            </eq>            </eq>
257            <!--           <eq> -->             <null>
           <!--             <cfield name="_own_pos_document_data.document_type"/> -->  
           <!--             <cfield name="_document_type_data._table"/> -->  
           <!--           </eq> -->  
           <!-- descarta todo own_pos_document muerto -->  
           <null>  
258              <cfield name="_own_pos_document_data._end_t"/>              <cfield name="_own_pos_document_data._end_t"/>
259            </null>            </null>
260          </and>          </and>
# Line 270  Line 273 
273      <!--identificador-->      <!--identificador-->
274      <box label="punto de venta"      <box label="punto de venta"
275        x="0" y="0" height="7" width="84">        x="0" y="0" height="7" width="84">
276          <datasource name="docOrgDataSource" cache="1"/>
277          <block name="docOrgBlock" datasource="docOrgDataSource">
278            <entry name="organizationNameEntry" x="1" y="2" width="40" style="label"/>
279            <entry name="ownBranchNameEntry" x="40" y="2" width="40" style="label"/>
280          </block>
281        <block name="documentsPosBlock" datasource="ownPosDataSource">        <block name="documentsPosBlock" datasource="ownPosDataSource">
282          <label text="organización" x="1" y="1" />          <label text="organización:" x="1" y="1" />
283          <label text="sucursal" x="40" y="1" />          <label text="sucursal:" x="40" y="1" />
284          <label text="punto de venta" x="1" y="3" />          <label text="punto de venta:" x="1" y="3" />
285          <label text="número" x="40" y="3" />          <label text="número:" x="40" y="3" />
286          <entry name="organizationNameEntry" x="1" y="2" width="40" />          <entry name="ownPosNameEntry" x="1" y="4" width="40" field="_entity_data.name" style="label" />
287          <entry name="ownBranchNameEntry" x="40" y="2" width="40" />          <entry name="ownPosIdEntry" x="40" y="4" width="10" field="_own_pos_data.number" style="label"/>
         <entry name="ownPosNameEntry" x="1" y="4" width="40" field="_entity_data.name" />  
         <entry name="ownPosIdEntry" x="40" y="4" width="10" field="_own_pos_data.number" />  
288        </block>        </block>
289      </box>      </box>
290      <box label="" x="0" y="6" height="16" width="84">      <box label="" x="0" y="6" height="16" width="84">
# Line 294  Line 300 
300           <entry x="50" y="2" width="10" name="posDocNumberEntry" field="_own_pos_document_data.number" rows="10" />             <entry x="50" y="2" width="10" name="posDocNumberEntry" field="_own_pos_document_data.number" rows="10" />  
301          <entry x="60" y="2" width="10" name="posDocPrintEntry" field="_own_pos_document_data.print_command" rows="10" />          <entry x="60" y="2" width="10" name="posDocPrintEntry" field="_own_pos_document_data.print_command" rows="10" />
302          <button x="1" y="13" trigger="commitTrigger" width="9" label="Aceptar" name="posDocCommitBtn" height="1"/>            <button x="1" y="13" trigger="commitTrigger" width="9" label="Aceptar" name="posDocCommitBtn" height="1"/>  
303          <button x="21" y="13" trigger="ownPosRollbackTrigger" width="9" label="Cancelar" name="posDocRollbackBtn" height="1"/>          <button x="21" y="13" trigger="posDocRollbackTrigger" width="9" label="Cancelar" name="posDocRollbackBtn" height="1"/>
304         <scrollbar page="10" x="80" y="2" width="3" height="10"/>         <scrollbar page="10" x="80" y="2" width="3" height="10"/>
305        </block>        </block>
306      </box>      </box>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26