7 |
my $uniqed=0; |
my $uniqed=0; |
8 |
</neb:Block> |
</neb:Block> |
9 |
<datasource name="tmpValuesDataSource" cache="1"/> |
<datasource name="tmpValuesDataSource" cache="1"/> |
10 |
|
<datasource name="tmpDespatchNoteDataSource" cache="1"/> |
11 |
<datasource name="payDataSource" cache="1"/> |
<datasource name="payDataSource" cache="1"/> |
12 |
<datasource name="prodSearchDataSource" cache="1"/> |
<datasource name="prodSearchDataSource" cache="1"/> |
13 |
<datasource name="prodResultDataSource" cache="1"/> |
<datasource name="prodResultDataSource" cache="1"/> |
212 |
runForm('product.gfd') |
runForm('product.gfd') |
213 |
]]></trigger> |
]]></trigger> |
214 |
|
|
215 |
|
|
216 |
<neb:Sub neb:src="wait.nebc"/> |
<neb:Sub neb:src="wait.nebc"/> |
217 |
|
<!-- este trigger recorre los items y genera un reporte para ser impreso --> |
218 |
|
<!-- mediante ruff --> |
219 |
|
<trigger name="ruffPrintTrigger" type="NAMED"> |
220 |
|
import hack |
221 |
|
import printing |
222 |
|
import sys |
223 |
|
if "../ruff" not in sys.path: |
224 |
|
sys.path.append("../ruff") |
225 |
|
import informe |
226 |
|
despatch_note = informe.new("ruff/own_document.xml") |
227 |
|
#encabezado |
228 |
|
despatch_note.header(fecha=printing.printField(tmpBlock.tmpDateEntry,10)) |
229 |
|
despatch_note.header(entity_code=str(ownDocumentBlock.clientRecipientBox.clientCodeEntry)) |
230 |
|
despatch_note.header(entity_name=str(ownDocumentBlock.clientRecipientBox.clientNameEntry)) |
231 |
|
#x.page_header(entity_category=str(.)) |
232 |
|
|
233 |
|
#carga de items |
234 |
|
ownItemBlock.firstRecord() |
235 |
|
iva_amount= 0.00 |
236 |
|
iva_rni_amount= 0.00 |
237 |
|
for index in range(ownItemBlock.getRecordCount()): |
238 |
|
if (index > 0) and ( not ownItemBlock.isEmpty()): |
239 |
|
ownItemBlock.nextRecord() |
240 |
|
document_item = { "descriptive": str(ownItemBlock.prodNameSEntry), |
241 |
|
"qtty": str(ownItemBlock.qtyEntry), |
242 |
|
} |
243 |
|
|
244 |
|
print document_item |
245 |
|
despatch_note.despatch_note.item.add_row(**document_item) |
246 |
|
tmpDespatchNoteDataSource.printing_despatch_note = despatch_note |
247 |
|
</trigger> |
248 |
|
|
249 |
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
250 |
import hack |
import hack |
251 |
from gnue.common.GDataObjects import ConnectionError as DBError |
from gnue.common.GDataObjects import ConnectionError as DBError |
252 |
import printing |
import printing |
253 |
|
import sys |
254 |
|
if "../ruff" not in sys.path: |
255 |
|
sys.path.append("../ruff") |
256 |
|
import informe |
257 |
#if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0: |
#if ownItemBlock.getRecordCount() > 0 and len(ownItemBlock.prodNameSEntry) > 0: |
258 |
if ownItemBlock.getRecordCount() > 0 : |
if ownItemBlock.getRecordCount() > 0 : |
259 |
callTrigger('startWaitingModeTrigger') |
callTrigger('startWaitingModeTrigger') |
260 |
try: |
try: |
261 |
callTrigger ('commitTrigger') |
callTrigger ('commitTrigger') |
262 |
|
despatch_note = tmpDespatchNoteDataSource.printing_despatch_note |
263 |
report='despatchNote-%s' % str(ownDocumentBlock.typeEntry) |
printing.previewPrint([despatch_note.render()],'xless -fn vga') |
|
hack.pleasePrint (self, str(ownDocumentBlock.typeEntry), report, [ 'id='+str(ownDocumentBlock.idEntry) ], |
|
|
str(ownPosDocumentBlock.documentPrintCommand)) |
|
|
|
|
|
# lines= [] |
|
|
# lines.append (printing.printDate ()) |
|
|
# lines.append () |
|
|
|
|
|
|
|
264 |
callTrigger('endWaitingModeTrigger') |
callTrigger('endWaitingModeTrigger') |
265 |
if getParameter ('invoiceid') : |
if getParameter ('invoiceid') : |
266 |
exit() |
exit() |
742 |
|
|
743 |
<label name="qtyLbl" text="Cantidad" x="45" y="10"/> |
<label name="qtyLbl" text="Cantidad" x="45" y="10"/> |
744 |
<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"> |
745 |
<!-- <trigger name="qtyEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> --> |
<trigger name="qtyEntryPreFocusout" type="PRE-FOCUSOUT" src="ruffPrintTrigger" /> |
746 |
</entry> |
</entry> |
747 |
|
|
748 |
<!-- <label name="priceLbl" text="Precio" x="56" y="10"/> --> |
<!-- <label name="priceLbl" text="Precio" x="56" y="10"/> --> |