835 |
|
|
836 |
</trigger> |
</trigger> |
837 |
|
|
|
<trigger name="totalCalcShowTrigger" type="NAMED"> |
|
|
if resultBlock.getRecordCount() > 0 and not resultBlock.getCurrentRecord().isEmpty(): |
|
|
import hack |
|
|
|
|
|
|
|
|
lTNeto = 0 |
|
|
lTTax = 0 |
|
|
|
|
|
sum = 0 |
|
|
lRecords = alienItemShowDataSource.getRecords() |
|
|
for index in range(len(lRecords)): |
|
|
lRecord = lRecords[index] |
|
|
lQty = hack.a2f(lRecord.getField("alien_product_item.qty")) |
|
|
lBonus = hack.a2f(lRecord.getField("alien_item.bonus")) |
|
|
lDiscount = hack.a2f(lRecord.getField("alien_item.discount")) |
|
|
lUnitPrice = hack.a2f(lRecord.getField("alien_product_item.unit_price")) |
|
|
|
|
|
lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount |
|
|
lTNeto += lItemPrice |
|
|
lTTax += hack.a2f(lRecord.getField("alien_item_tax.amount")) |
|
|
|
|
|
totalShowBlock.netoEntry = str(lTNeto) |
|
|
totalShowBlock.ivaEntry = str(lTTax) |
|
|
totalShowBlock.totalEntry = str(lTNeto+lTTax) |
|
|
else: |
|
|
totalShowBlock.netoEntry = "0.00" |
|
|
totalShowBlock.ivaEntry = "0.00" |
|
|
totalShowBlock.totalEntry = "0.00" |
|
|
|
|
|
</trigger> |
|
|
|
|
838 |
<trigger name="totalCalcTrigger" type="NAMED"> |
<trigger name="totalCalcTrigger" type="NAMED"> |
839 |
import hack |
import hack |
840 |
|
|
1222 |
<page name="Remito de Proveedor (Consulta/borrado)"> |
<page name="Remito de Proveedor (Consulta/borrado)"> |
1223 |
<trigger type="PRE-FOCUSIN" src="resultFocusOutTrigger" /> |
<trigger type="PRE-FOCUSIN" src="resultFocusOutTrigger" /> |
1224 |
<trigger type="PRE-FOCUSIN" src="bringDespatchNoteTypeShowTrigger" /> |
<trigger type="PRE-FOCUSIN" src="bringDespatchNoteTypeShowTrigger" /> |
|
<trigger type="PRE-FOCUSIN" src="totalCalcShowTrigger" /> |
|
1225 |
<box height="12" label="Remito de Productos de Proveedor" |
<box height="12" label="Remito de Productos de Proveedor" |
1226 |
name="despatchNoteHeaderBox" width="107" x="0" y="0"> |
name="despatchNoteHeaderBox" width="107" x="0" y="0"> |
1227 |
|
|
1309 |
<entry x="55" y="14" field="alien_product_item.unit_price" name="unitPriceEntry" typecast="number" displaymask="%0.2f" |
<entry x="55" y="14" field="alien_product_item.unit_price" name="unitPriceEntry" typecast="number" displaymask="%0.2f" |
1310 |
width="10" rows="7" style="label" readonly=""> |
width="10" rows="7" style="label" readonly=""> |
1311 |
</entry> |
</entry> |
|
<label name="taxLbl" text="IVA" x="65" y="13" /> |
|
|
<!-- <entry x="65" y="14" name="taxPercentEntry" width="5" rows="7" style="label" typecast="number" displaymask="%0.2f"/> --> |
|
|
<entry x="65" y="14" field="alien_product_item.product" name="taxPercentEntry" readonly="" |
|
|
width="20" style="textlookup" foreign_key="productTaxDataSource._product_data.id" |
|
|
foreign_key_description="_product_tax_data.amount" rows="7"> |
|
|
</entry> |
|
|
|
|
|
<entry x="65" y="14" readonly="" field="alien_item_tax.amount" name="taxAmountEntry" width="5" rows="5" hidden=""/> |
|
|
<entry x="47" y="4" readonly="" field="alien_item_tax.tax" name="taxTypeEntry" width="5" rows="5" default="1" hidden=""/> |
|
|
|
|
|
<label name="discountLbl" text="Descuento" x="71" y="13"/> |
|
|
<entry field="alien_item.discount" name="discountEntry" typecast="number" displaymask="%0.2f" |
|
|
rows="7" width="10" x="71" y="14" default="0" style="label" readonly=""> |
|
|
</entry> |
|
|
<!-- <label name="itemTotalLbl" text="Total" x="82" y="13"/> --> |
|
|
<!-- <entry name="itemTotalEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f" --> |
|
|
<!-- rows="10" width="10" x="82" y="14" readonly=""> --> |
|
|
<!-- </entry> --> |
|
|
|
|
|
<!-- <label name="bonusLbl" text="Bonificación" x="66" y="3"/> --> |
|
1312 |
<entry field="alien_item.bonus" name="bonusEntry" value="0" typecast="number" displaymask="%0.2f" |
<entry field="alien_item.bonus" name="bonusEntry" value="0" typecast="number" displaymask="%0.2f" |
1313 |
rows="7" width="12" x="66" y="4" default="0" hidden=""> |
rows="7" width="12" x="66" y="4" default="0" hidden=""> |
1314 |
<trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
<trigger type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
1316 |
<scrollbar page="5" |
<scrollbar page="5" |
1317 |
x="103" y="14" width="1" height="7"/> |
x="103" y="14" width="1" height="7"/> |
1318 |
</block> |
</block> |
|
<block datasource="nil" name="totalShowBlock"> |
|
|
<label name="totalLbl" text="Neto" x="55" y="21"/> |
|
|
<entry name="netoEntry" readonly="" style="label" x="55" y="22" width="12" default="0.00"/> |
|
|
<label name="ivaLbl" text="IVA" x="65" y="21"/> |
|
|
<entry name="ivaEntry" readonly="" style="label" x="65" y="22" width="12" default="0.00"/> |
|
|
<label name="totalLbl" text="Total" x="82" y="21"/> |
|
|
<entry name="totalEntry" readonly="" style="label" x="82" y="22" width="12" default="0.00"/> |
|
|
</block> |
|
1319 |
|
|
1320 |
<block datasource="nil" name="tmpBlock"> |
<block datasource="nil" name="tmpBlock"> |
1321 |
<button x="51" y="24" trigger="deleteTrigger" width="10" label="Borrar" |
<button x="51" y="24" trigger="deleteTrigger" width="10" label="Borrar" |