/[papo]/papo/forms/productProviderInvoice.gfd
ViewVC logotype

Diff of /papo/forms/productProviderInvoice.gfd

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

revision 1.5 by apronotti, Tue Dec 3 21:32:42 2002 UTC revision 1.6 by apronotti, Wed Dec 11 22:14:43 2002 UTC
# Line 269  Line 269 
269    </trigger>    </trigger>
270    
271    <trigger name="commitTrigger" type="NAMED">    <trigger name="commitTrigger" type="NAMED">
272      if not str(alienDocumentBlock.numberEntry):      if not alienDocumentBlock.getCurrentRecord().isInserted():
273          genericBox("No se puede grabar modificaciones",["Ok"])
274        elif not str(alienDocumentBlock.numberEntry):
275        genericBox("Falta el número del comprobante",["Ok"])        genericBox("Falta el número del comprobante",["Ok"])
276      elif not str(alienDocumentBlock.dateEntry):      elif not str(alienDocumentBlock.dateEntry):
277        genericBox("Falta la fecha del comprobante",["Ok"])        genericBox("Falta la fecha del comprobante",["Ok"])
# Line 316  Line 318 
318    </trigger>    </trigger>
319    
320    <trigger name="rollbackTrigger" type="NAMED">    <trigger name="rollbackTrigger" type="NAMED">
321        alienItemBlock.productEntry.allowedValues()
322      proceedingBlock.processRollback()      proceedingBlock.processRollback()
323      alienDocumentBlock.processRollback()      alienDocumentBlock.processRollback()
324      alienItemBlock.processRollback()      alienItemBlock.processRollback()
# Line 358  Line 361 
361    
362    <trigger name="totalCalcTrigger" type="NAMED">    <trigger name="totalCalcTrigger" type="NAMED">
363      import hack      import hack
364        
365        alienItemBlock.taxAmountEntry = hack.a2f(alienItemBlock.unitPriceEntry) * \
366                                        hack.a2f(alienItemBlock.qtyEntry) * (hack.a2f(alienItemBlock.taxPercentEntry)/100)
367        
368      sum = 0      sum = 0
369      lRecords = alienItemDataSource.getRecords()      lRecords = alienItemDataSource.getRecords()
370      for index in range(len(lRecords)):      for index in range(len(lRecords)):
# Line 368  Line 374 
374        lDiscount = hack.a2f(lRecord.getField("alien_item.discount"))        lDiscount = hack.a2f(lRecord.getField("alien_item.discount"))
375        lUnitPrice = hack.a2f(lRecord.getField("alien_product_item.unit_price"))        lUnitPrice = hack.a2f(lRecord.getField("alien_product_item.unit_price"))
376        lTax = hack.a2f(lRecord.getField("alien_item_tax.amount"))        lTax = hack.a2f(lRecord.getField("alien_item_tax.amount"))
377        sum = sum + (lQty * lUnitPrice * (1+lTax/100)) - lBonus - lDiscount        sum += lQty * lUnitPrice + lTax - lBonus - lDiscount
378      totalBlock.totalEntry = str(sum)      totalBlock.totalEntry = str(sum)
379      payBlock.cashEntry = str(sum)      payBlock.cashEntry = str(sum)
380      payBlock.ctaCteEntry = ""      payBlock.ctaCteEntry = ""
# Line 556  Line 562 
562          <entry field="date" name="dateEntry" typecast="date"          <entry field="date" name="dateEntry" typecast="date"
563            rows="1" width="22" x="22" y="7"/>            rows="1" width="22" x="22" y="7"/>
564    
565          <button x="44" y="7" trigger="toDayTrigger" width="3" label="."          <button x="44" y="7" trigger="toDayTrigger" width="4" label="hoy"
566            name="dateBtn" height="1"/>            name="dateBtn" height="1"/>
567                
568          <label name="guideNumberLbl" text="Número de guía" x="48" y="6" />          <label name="guideNumberLbl" text="Número de guía" x="48" y="6" />
# Line 585  Line 591 
591                 default="1">                 default="1">
592            <trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" />            <trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" />
593          </entry>          </entry>
594    
595         <label name="productLbl" text="Producto" x="15" y="1"/>         <label name="productLbl" text="Producto" x="15" y="1"/>
596          <button x="32" y="1" trigger="productTrigger" width="3" label="..."          <button x="32" y="1" trigger="productTrigger" width="3" label="..."
597            name="productBtn" height="1"/>            name="productBtn" height="1"/>
# Line 600  Line 607 
607            <trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" />            <trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" />
608          </entry>          </entry>
609          <label name="taxLbl" text="IVA" x="47" y="1" />          <label name="taxLbl" text="IVA" x="47" y="1" />
610          <entry x="47" y="2" readonly="" field="alien_item_tax.amount" name="taxAmountEntry" width="5" rows="5" default="21"/>          <entry x="47" y="2" readonly="" field="alien_item_tax.amount" name="taxAmountEntry" width="5" rows="5" hidden=""/>
611            <entry x="47" y="2" name="taxPercentEntry" width="5" rows="5" default="21">
612            <trigger name="taxPercentEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger"/>
613            </entry>
614          <entry x="47" y="2" readonly="" field="alien_item_tax.tax" name="taxTypeEntry" width="5" rows="5" default="1" hidden=""/>          <entry x="47" y="2" readonly="" field="alien_item_tax.tax" name="taxTypeEntry" width="5" rows="5" default="1" hidden=""/>
615          <label name="discountLbl" text="Descuento" x="53" y="1"/>          <label name="discountLbl" text="Descuento" x="53" y="1"/>
616          <entry field="alien_item.discount" name="discountEntry" value="0" typecast="number"          <entry field="alien_item.discount" name="discountEntry" value="0" typecast="number"

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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