192 |
<cfield name="own_item.id"/> |
<cfield name="own_item.id"/> |
193 |
<cfield name="own_product_item.own_item"/> |
<cfield name="own_product_item.own_item"/> |
194 |
</eq> |
</eq> |
195 |
<eq> |
<!-- <eq> --> |
196 |
<cfield name="own_item.id"/> |
<!-- <cfield name="own_item.id"/> --> |
197 |
<cfield name="own_item_tax.own_item"/> |
<!-- <cfield name="own_item_tax.own_item"/> --> |
198 |
</eq> |
<!-- </eq> --> |
199 |
</condition> |
</condition> |
200 |
</datasource> |
</datasource> |
201 |
|
|
292 |
ownOrganizationBlock.clear() |
ownOrganizationBlock.clear() |
293 |
ownOrganizationBlock.initQuery() |
ownOrganizationBlock.initQuery() |
294 |
ownOrganizationBlock.processQuery() |
ownOrganizationBlock.processQuery() |
295 |
tmpValuesDataSource.ownIVACond = str(ownOrganizationBlock.condIVAEntry) |
#tmpValuesDataSource.ownIVACond = str(ownOrganizationBlock.condIVAEntry) |
296 |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
297 |
callTrigger('searchNextDespatchNoteNumber') |
callTrigger('searchNextDespatchNoteNumber') |
298 |
callTrigger('fillDespatchNoteTrigger') |
callTrigger('fillDespatchNoteTrigger') |
313 |
</trigger> |
</trigger> |
314 |
|
|
315 |
<!-- Este trigger clacula el total del remito valorizado --> |
<!-- Este trigger clacula el total del remito valorizado --> |
316 |
<trigger name="totalCalcTrigger" type="NAMED"> |
<!-- <trigger name="totalCalcTrigger" type="NAMED"> --> |
317 |
import hack |
<!-- import hack --> |
318 |
|
|
319 |
lQty = hack.a2f(ownItemBlock.qtyEntry) |
<!-- lQty = hack.a2f(ownItemBlock.qtyEntry) --> |
320 |
lBonus = hack.a2f(ownItemBlock.bonusEntry) |
<!-- lBonus = hack.a2f(ownItemBlock.bonusEntry) --> |
321 |
lDiscount = hack.a2f(ownItemBlock.discountEntry) |
<!-- lDiscount = hack.a2f(ownItemBlock.discountEntry) --> |
322 |
lUnitPrice = hack.a2f(ownItemBlock.unitPriceEntry) |
<!-- lUnitPrice = hack.a2f(ownItemBlock.unitPriceEntry) --> |
323 |
|
|
324 |
lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount |
<!-- lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount --> |
325 |
|
|
326 |
sourceCode = str(tmpValuesDataSource.taxSourceCode) |
<!-- sourceCode = str(tmpValuesDataSource.taxSourceCode) --> |
327 |
ownIVACond = hack.a2f(tmpValuesDataSource.ownIVACond) |
<!-- ownIVACond = hack.a2f(tmpValuesDataSource.ownIVACond) --> |
328 |
alienIVACond = hack.a2f(tmpValuesDataSource.alienIVACond) |
<!-- alienIVACond = hack.a2f(tmpValuesDataSource.alienIVACond) --> |
329 |
amount = lItemPrice |
<!-- amount = lItemPrice --> |
330 |
taxPercent = hack.a2f(ownItemBlock.ivaEntry) |
<!-- taxPercent = hack.a2f(ownItemBlock.ivaEntry) --> |
331 |
|
|
332 |
exec(sourceCode) |
<!-- exec(sourceCode) --> |
333 |
ownItemBlock.taxAmountEntry = hack.a2f(graft(ownIVACond,alienIVACond,amount,taxPercent)) |
<!-- ownItemBlock.taxAmountEntry = hack.a2f(graft(ownIVACond,alienIVACond,amount,taxPercent)) --> |
334 |
ownItemBlock.itemNetoEntry = lItemPrice |
<!-- ownItemBlock.itemNetoEntry = lItemPrice --> |
335 |
ownItemBlock.itemTotalEntry = lItemPrice + hack.a2f(ownItemBlock.taxAmountEntry) |
<!-- ownItemBlock.itemTotalEntry = lItemPrice + hack.a2f(ownItemBlock.taxAmountEntry) --> |
336 |
|
|
337 |
lTNeto = 0 |
<!-- lTNeto = 0 --> |
338 |
lTTax = 0 |
<!-- lTTax = 0 --> |
339 |
|
|
340 |
lRecords = ownItemDataSource.getRecords() |
<!-- lRecords = ownItemDataSource.getRecords() --> |
341 |
for index in range(len(lRecords)): |
<!-- for index in range(len(lRecords)): --> |
342 |
lRecord = lRecords[index] |
<!-- lRecord = lRecords[index] --> |
343 |
lQty = hack.a2f(lRecord.getField("own_product_item.qty")) |
<!-- lQty = hack.a2f(lRecord.getField("own_product_item.qty")) --> |
344 |
lBonus = hack.a2f(lRecord.getField("own_item.bonus")) |
<!-- lBonus = hack.a2f(lRecord.getField("own_item.bonus")) --> |
345 |
lDiscount = hack.a2f(lRecord.getField("own_item.discount")) |
<!-- lDiscount = hack.a2f(lRecord.getField("own_item.discount")) --> |
346 |
lUnitPrice = hack.a2f(lRecord.getField("own_product_item.unit_price")) |
<!-- lUnitPrice = hack.a2f(lRecord.getField("own_product_item.unit_price")) --> |
347 |
|
|
348 |
lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount |
<!-- lItemPrice = (lQty * lUnitPrice) - lBonus - lDiscount --> |
349 |
lTNeto += lItemPrice |
<!-- lTNeto += lItemPrice --> |
350 |
lTTax += hack.a2f(lRecord.getField("own_item_tax.amount")) |
<!-- lTTax += hack.a2f(lRecord.getField("own_item_tax.amount")) --> |
351 |
|
|
352 |
totalBlock.netoEntry = str(lTNeto) |
<!-- totalBlock.netoEntry = str(lTNeto) --> |
353 |
totalBlock.ivaEntry = str(lTTax) |
<!-- totalBlock.ivaEntry = str(lTTax) --> |
354 |
totalBlock.totalEntry = str(lTNeto+lTTax) |
<!-- totalBlock.totalEntry = str(lTNeto+lTTax) --> |
355 |
</trigger> |
<!-- </trigger> --> |
356 |
|
|
357 |
|
|
358 |
<page name="Remito para Clientes"> |
<page name="Remito para Clientes"> |
587 |
ownItemBlock.prodCodeSEntry = "" |
ownItemBlock.prodCodeSEntry = "" |
588 |
ownItemBlock.prodNameSEntry = "" |
ownItemBlock.prodNameSEntry = "" |
589 |
ownItemBlock.qtyEntry = 0.00 |
ownItemBlock.qtyEntry = 0.00 |
590 |
ownItemBlock.unitPriceEntry = 0.00 |
#ownItemBlock.unitPriceEntry = 0.00 |
591 |
ownItemBlock.priceEntry = "0" |
#ownItemBlock.priceEntry = "0" |
592 |
ownItemBlock.taxAmountEntry = 0 |
#ownItemBlock.taxAmountEntry = 0 |
593 |
ownItemBlock.ivaEntry = 0 |
#ownItemBlock.ivaEntry = 0 |
594 |
ownItemBlock.discountEntry = 0.00 |
#ownItemBlock.discountEntry = 0.00 |
595 |
ownItemBlock.bonusEntry = 0.00 |
#ownItemBlock.bonusEntry = 0.00 |
596 |
ownItemBlock.itemTotalEntry = 0.00 |
#ownItemBlock.itemTotalEntry = 0.00 |
597 |
|
|
598 |
callTrigger('totalCalcTrigger') |
#callTrigger('totalCalcTrigger') |
599 |
</trigger> |
</trigger> |
600 |
|
|
601 |
<trigger name="prodSearchTrigger" type="NAMED"> |
<trigger name="prodSearchTrigger" type="NAMED"> |
685 |
ownItemBlock.ivaEntry = hack.a2f(prodResultBlock.prodIVATaxEntry) |
ownItemBlock.ivaEntry = hack.a2f(prodResultBlock.prodIVATaxEntry) |
686 |
ownItemBlock.unitPriceEntry = str(prodResultBlock.prodUnitPriceEntry) |
ownItemBlock.unitPriceEntry = str(prodResultBlock.prodUnitPriceEntry) |
687 |
|
|
688 |
callTrigger('totalCalcTrigger') |
#callTrigger('totalCalcTrigger') |
689 |
</trigger> |
</trigger> |
690 |
<!-- ****** Fin búsqueda ************ --> |
<!-- ****** Fin búsqueda ************ --> |
691 |
|
|
712 |
|
|
713 |
<label name="qtyLbl" text="Cantidad" x="45" y="10"/> |
<label name="qtyLbl" text="Cantidad" x="45" y="10"/> |
714 |
<entry field="own_product_item.qty" name="qtyEntry" rows="10" typecast="number" displaymask="%0.3f" width="11" x="45" y="11"> |
<entry field="own_product_item.qty" name="qtyEntry" rows="10" typecast="number" displaymask="%0.3f" width="11" x="45" y="11"> |
715 |
<trigger name="qtyEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
<!-- <trigger name="qtyEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> --> |
716 |
</entry> |
</entry> |
717 |
|
|
718 |
<label name="priceLbl" text="Precio" x="56" y="10"/> |
<!-- <label name="priceLbl" text="Precio" x="56" y="10"/> --> |
719 |
<entry x="56" y="11" name="unitPriceEntry" field="own_product_item.unit_price" width="10" rows="10" typecast="number" displaymask="%0.2f"> |
<!-- <entry x="56" y="11" name="unitPriceEntry" --> |
720 |
<trigger name="unitPriceEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
<!-- field="own_product_item.unit_price" width="10" rows="10" --> |
721 |
</entry> |
<!-- typecast="number" displaymask="%0.2f" hidden=""> --> |
722 |
|
<!-- </entry> --> |
723 |
<entry x="1" y="14" readonly="" field="own_product_item.price" name="priceEntry" width="10" rows="5" hidden=""/> |
<entry x="1" y="14" readonly="" field="own_product_item.price" name="priceEntry" width="10" rows="5" hidden=""/> |
724 |
<entry x="1" y="14" readonly="" field="own_item_tax.tax" name="taxTypeEntry" width="10" rows="5" default="1" hidden="" typecast="number"/> |
<!-- <entry x="1" y="14" readonly="" field="own_item_tax.tax" name="taxTypeEntry" width="10" rows="5" default="1" hidden="" typecast="number"/> --> |
725 |
<entry x="1" y="14" readonly="" field="own_item_tax.amount" name="taxAmountEntry" width="10" rows="5" hidden="" typecast="number"/> |
<!-- <entry x="1" y="14" readonly="" field="own_item_tax.amount" name="taxAmountEntry" width="10" rows="5" hidden="" typecast="number"/> --> |
726 |
|
|
727 |
<label name="ivaLbl" text="IVA" x="66" y="10"/> |
<!-- <label name="ivaLbl" text="IVA" x="66" y="10"/> --> |
728 |
<entry name="ivaEntry" displaymask="%0.0f" |
<!-- <entry name="ivaEntry" displaymask="%0.0f" --> |
729 |
rows="10" width="3" x="66" y="11" default="0"> |
<!-- rows="10" width="3" x="66" y="11" default="0"> --> |
730 |
<trigger name="ivaEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
<!-- </entry> --> |
731 |
</entry> |
<!-- <label name="discountLbl" text="Dto." x="70" y="10"/> --> |
732 |
<label name="discountLbl" text="Dto." x="70" y="10"/> |
<!-- <entry field="own_item.discount" name="discountEntry" default="0.00" typecast="number" displaymask="%0.2f" --> |
733 |
<entry field="own_item.discount" name="discountEntry" default="0.00" typecast="number" displaymask="%0.2f" |
<!-- rows="10" width="6" x="69" y="11"> --> |
734 |
rows="10" width="6" x="69" y="11"> |
<!-- </entry> --> |
|
<trigger name="discountEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
|
|
</entry> |
|
735 |
<!-- <label name="bonusLbl" text="Bonif." x="79" y="10"/> --> |
<!-- <label name="bonusLbl" text="Bonif." x="79" y="10"/> --> |
736 |
<entry field="own_item.bonus" name="bonusEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f" |
<!-- <entry field="own_item.bonus" name="bonusEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f" --> |
737 |
rows="10" width="10" x="79" y="11" hidden=""/> |
<!-- rows="10" width="10" x="79" y="11" hidden=""/> --> |
738 |
<label name="itemNetolLbl" text="Neto" x="76" y="10"/> |
<!-- <label name="itemNetolLbl" text="Neto" x="76" y="10"/> --> |
739 |
<entry name="itemNetoEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f" |
<!-- <entry name="itemNetoEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f" --> |
740 |
rows="10" width="10" x="76" y="11"/> |
<!-- rows="10" width="10" x="76" y="11"/> --> |
741 |
<label name="itemTotalLbl" text="Total" x="85" y="10"/> |
<!-- <label name="itemTotalLbl" text="Total" x="85" y="10"/> --> |
742 |
<entry name="itemTotalEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f" |
<!-- <entry name="itemTotalEntry" style="label" default="0.00" typecast="number" displaymask="%0.2f" --> |
743 |
rows="10" width="10" x="85" y="11"> |
<!-- rows="10" width="10" x="85" y="11"> --> |
744 |
</entry> |
<!-- </entry> --> |
745 |
<button name="prodDeleteButton" trigger="prodDeleteTrigger" label="Borrar" width="7" height="10" x="95" y="11"/> |
<button name="prodDeleteButton" trigger="prodDeleteTrigger" label="Borrar" width="7" height="10" x="95" y="11"/> |
746 |
<scrollbar page="5" x="103" y="11" width="1" height="10"/> |
<scrollbar page="5" x="103" y="11" width="1" height="10"/> |
747 |
|
|
752 |
|
|
753 |
</block> |
</block> |
754 |
<!-- Datasource que sirve para almacenar el resultado de la búsqueda --> |
<!-- Datasource que sirve para almacenar el resultado de la búsqueda --> |
755 |
<block datasource="tmpValuesDataSource" name="totalBlock" restrictInsert=""> |
<!-- <block datasource="tmpValuesDataSource" name="totalBlock" restrictInsert=""> --> |
756 |
<label text="Neto " x="55" y="21"/> |
<!-- <label text="Neto " x="55" y="21"/> --> |
757 |
<entry name="netoEntry" style="label" readonly="" x="55" y="22" width="12" typecast="number" displaymask="%0.2f" |
<!-- <entry name="netoEntry" style="label" readonly="" x="55" y="22" width="12" typecast="number" displaymask="%0.2f" --> |
758 |
default="0.00"/> |
<!-- default="0.00"/> --> |
759 |
<label text="IVA " x="66" y="21"/> |
<!-- <label text="IVA " x="66" y="21"/> --> |
760 |
<entry name="ivaEntry" style="label" readonly="" x="66" y="22" width="12" typecast="number" displaymask="%0.2f" |
<!-- <entry name="ivaEntry" style="label" readonly="" x="66" y="22" width="12" typecast="number" displaymask="%0.2f" --> |
761 |
default="0.00"/> |
<!-- default="0.00"/> --> |
762 |
<label text="Total " x="82" y="21"/> |
<!-- <label text="Total " x="82" y="21"/> --> |
763 |
<entry name="totalEntry" style="label" readonly="" x="82" y="22" width="12" typecast="number" displaymask="%0.2f" |
<!-- <entry name="totalEntry" style="label" readonly="" x="82" y="22" width="12" typecast="number" displaymask="%0.2f" --> |
764 |
default="0.00"/> |
<!-- default="0.00"/> --> |
765 |
</block> |
<!-- </block> --> |
766 |
<neb:Sub neb:src="setStock.nebc" ownDocumentId="ownDocumentBlock.idEntry" storehouseEntityId="ownStorehouseBlock.ownStorehouseIdEntry" |
<neb:Sub neb:src="setStock.nebc" ownDocumentId="ownDocumentBlock.idEntry" storehouseEntityId="ownStorehouseBlock.ownStorehouseIdEntry" |
767 |
stockAddTrigger="stockAddTrigger" stockSubstractTrigger="stockSubstractTrigger"/> |
stockAddTrigger="stockAddTrigger" stockSubstractTrigger="stockSubstractTrigger"/> |
768 |
|
|