216 |
<cfield name="_price_data.product"/> |
<cfield name="_price_data.product"/> |
217 |
<cfield name="_product_store_data.product"/> |
<cfield name="_product_store_data.product"/> |
218 |
</eq> |
</eq> |
219 |
|
<null> <cfield name="_price_data._end_t"/> </null> |
220 |
<null> |
<null> |
221 |
<cfield name="_product_store_data._end_t"/> |
<cfield name="_product_store_data._end_t"/> |
222 |
</null> |
</null> |
232 |
runForm('product.gfd') |
runForm('product.gfd') |
233 |
]]></trigger> |
]]></trigger> |
234 |
|
|
235 |
|
<neb:Sub neb:src="wait.nebc"/> |
|
<trigger name="startWaitingModeTrigger" type="NAMED"><![CDATA[ |
|
|
setStatusText("Procesando ...") |
|
|
try: |
|
|
# gnue version <= 0.4 |
|
|
from gnue.forms.GFEvent import GFEvent |
|
|
except ImportError: |
|
|
# gnue version >= 0.5 |
|
|
from gnue.common.events.Event import Event as GFEvent |
|
|
|
|
|
# busy clock |
|
|
self._object.dispatchEvent(GFEvent('beginWAIT')) |
|
|
]]></trigger> |
|
|
|
|
|
<trigger name="endWaitingModeTrigger" type="NAMED"><![CDATA[ |
|
|
try: |
|
|
# gnue version <= 0.4 |
|
|
from gnue.forms.GFEvent import GFEvent |
|
|
except ImportError: |
|
|
# gnue version >= 0.5 |
|
|
from gnue.common.events.Event import Event as GFEvent |
|
|
|
|
|
self._object.dispatchEvent(GFEvent('endWAIT')) |
|
|
setStatusText("Listo") |
|
|
]]></trigger> |
|
236 |
|
|
237 |
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
<trigger name="printTrigger" type="NAMED"><![CDATA[ |
238 |
import hack |
import hack |
249 |
]]></trigger> |
]]></trigger> |
250 |
|
|
251 |
<trigger name="commitTrigger" type="NAMED"> |
<trigger name="commitTrigger" type="NAMED"> |
252 |
|
from gnue.common.GDataObjects import ConnectionError as DBError |
253 |
|
|
254 |
|
try: |
255 |
|
commitProgress= 0 |
256 |
ownDocumentBlock.ownPosEntityIdEntry = str(ownPosBlock.ownPosEntityIdEntry) |
ownDocumentBlock.ownPosEntityIdEntry = str(ownPosBlock.ownPosEntityIdEntry) |
257 |
ownDocumentBlock.numberEntry= str(ownPosDocumentBlock.documentNumberEntry) |
ownDocumentBlock.numberEntry= str(ownPosDocumentBlock.documentNumberEntry) |
|
ownPosDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1) |
|
|
|
|
258 |
ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry ) |
ownDocumentBlock.dateEntry = str(tmpBlock.tmpDateEntry ) |
259 |
if len(ownDocumentBlock.dateEntry) == 0: |
if len(ownDocumentBlock.dateEntry) == 0: |
260 |
ownDocumentBlock.dateEntry = ownDocumentDataSource.getTimeStamp() |
ownDocumentBlock.dateEntry = ownDocumentDataSource.getTimeStamp() |
261 |
|
# this one also commits ownItemBlock |
262 |
|
ownDocumentBlock.postChanges () |
263 |
|
|
|
ownDocumentBlock.idEntry.autofillBySequence('own_document_id_seq') |
|
|
|
|
|
ownDocumentBlock.commit() |
|
264 |
lOwnDocId = str(ownDocumentBlock.idEntry) |
lOwnDocId = str(ownDocumentBlock.idEntry) |
265 |
|
|
266 |
|
commitProgress= 1 |
267 |
|
ownPosDocumentBlock.documentNumberEntry.atomicModify (lambda x: int(x)+1) |
268 |
|
ownPosDocumentBlock.postChanges () |
269 |
|
|
270 |
|
commitProgress= 2 |
271 |
ownItemToUpdBlock.initQuery() |
ownItemToUpdBlock.initQuery() |
272 |
ownItemToUpdBlock.ownDocumentEntry = lOwnDocId |
ownItemToUpdBlock.ownDocumentEntry = lOwnDocId |
273 |
ownItemToUpdBlock.processQuery() |
ownItemToUpdBlock.processQuery() |
274 |
|
# move the stock |
275 |
lRecordCount = ownItemToUpdBlock.getRecordCount() |
lRecordCount = ownItemToUpdBlock.getRecordCount() |
276 |
for recNum in range(lRecordCount): |
for recNum in range(lRecordCount): |
277 |
ownItemToUpdBlock.jumpRecord(recNum) |
ownItemToUpdBlock.jumpRecord(recNum) |
278 |
ownItemToUpdBlock.levelEntry.atomicModify(lambda x:x+round(float(str(ownItemToUpdBlock.qtyEntry)),4)) |
ownItemToUpdBlock.levelEntry.atomicModify(lambda x:x+round(float(str(ownItemToUpdBlock.qtyEntry)),4)) |
279 |
ownItemToUpdBlock.clear() |
ownItemToUpdBlock.clear() |
280 |
|
|
281 |
|
commitConnection () |
282 |
|
except DBError, err: |
283 |
|
errors= ['el documento', 'el incremento del número de documento', 'los cambios de stock'] |
284 |
|
rollbackConnection () |
285 |
|
genericBox ('Hay problemas para grabar %s: %s.\nLos datos no han sido grabados.' % (errors[commitProgress], err), ['Aceptar']) |
286 |
</trigger> |
</trigger> |
287 |
|
|
288 |
<trigger name="rollbackTrigger" type="NAMED"> |
<trigger name="rollbackTrigger" type="NAMED"> |
290 |
for block in form._object._blockList: |
for block in form._object._blockList: |
291 |
block.clear() |
block.clear() |
292 |
|
|
293 |
ownDocumentBlock.newRecord() |
# ownDocumentBlock.newRecord() |
294 |
|
|
295 |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
tmpBlock.tmpDateEntry = ownDocumentDataSource.getTimeStamp() |
296 |
callTrigger('searchNextReturnNoteNumber') |
callTrigger('searchNextReturnNoteNumber') |
297 |
#setFocus(ownDocumentBlock.clientCodeEntry) |
# setFocus(ownDocumentBlock.clientCodeEntry) |
298 |
</trigger> |
</trigger> |
299 |
|
|
300 |
<trigger name="startUp" type="On-Startup"> |
<trigger name="startUp" type="On-Startup"> |
301 |
ownDocumentBlock.typeEntry = <neb:Inline>'"'.PAPO::returnNote.'"'</neb:Inline> |
ownDocumentBlock.typeEntry = <neb:Inline>'"'.PAPO::returnNote.'"'</neb:Inline> |
302 |
tmpValuesDataSource.priceTypeId = None |
tmpValuesDataSource.priceTypeId = None |
303 |
tmpValuesDataSource.onSwitch = "0" |
tmpValuesDataSource.onSwitch = "0" |
304 |
ownOrganizationBlock.clear() |
ownOrganizationBlock.clear() |
382 |
str(ownDocumentBlock.clientRecipientBox.currentClientEntry)}) |
str(ownDocumentBlock.clientRecipientBox.currentClientEntry)}) |
383 |
clientResultSet.firstRecord() |
clientResultSet.firstRecord() |
384 |
tmpValuesDataSource.priceTypeId = clientResultSet.current.getField("_price_type_data._table") |
tmpValuesDataSource.priceTypeId = clientResultSet.current.getField("_price_type_data._table") |
385 |
]]></trigger> |
]]></trigger> |
386 |
|
|
387 |
<!-- Bloque para la búsqueda de clientes --> |
<!-- Bloque para la búsqueda de clientes --> |
388 |
<block name="clientResultBlock" datasource="clientSearchDataSource"> |
<block name="clientResultBlock" datasource="clientSearchDataSource"> |
402 |
ownDocumentBlock.clientRecipientBox.clientCodeEntry = codeToSearch |
ownDocumentBlock.clientRecipientBox.clientCodeEntry = codeToSearch |
403 |
ownDocumentBlock.clientRecipientBox.clientNameEntry = nameToSearch |
ownDocumentBlock.clientRecipientBox.clientNameEntry = nameToSearch |
404 |
|
|
405 |
|
def callback (returnValue): |
406 |
|
global block |
407 |
|
if returnValue >= 0: |
408 |
|
clientResultBlock.jumpRecord(returnValue) |
409 |
|
ownDocumentBlock.clientRecipientBox.clientCodeEntry = str(clientResultBlock.uidEntry) |
410 |
|
ownDocumentBlock.clientRecipientBox.clientNameEntry = str(clientResultBlock.nameEntry) |
411 |
|
ownDocumentBlock.clientRecipientBox.clientEntry = str(clientResultBlock.idEntry) |
412 |
|
callTrigger('startWaitingModeTrigger') |
413 |
|
callTrigger('bringClientDataTrigger') |
414 |
|
callTrigger('endWaitingModeTrigger') |
415 |
|
|
416 |
callTrigger('startWaitingModeTrigger') |
callTrigger('startWaitingModeTrigger') |
417 |
clientResultBlock.initQuery() |
clientResultBlock.initQuery() |
418 |
if codeToSearch: |
if codeToSearch: |
423 |
callTrigger('endWaitingModeTrigger') |
callTrigger('endWaitingModeTrigger') |
424 |
recordCount = clientResultBlock.getRecordCount() |
recordCount = clientResultBlock.getRecordCount() |
425 |
if recordCount > 1: |
if recordCount > 1: |
|
def callback (returnValue): |
|
|
global block |
|
|
if returnValue >= 0: |
|
|
clientResultBlock.jumpRecord(returnValue) |
|
|
ownDocumentBlock.clientRecipientBox.clientCodeEntry = str(clientResultBlock.uidEntry) |
|
|
ownDocumentBlock.clientRecipientBox.clientNameEntry = str(clientResultBlock.nameEntry) |
|
|
ownDocumentBlock.clientRecipientBox.clientEntry = str(clientResultBlock.idEntry) |
|
|
callTrigger('startWaitingModeTrigger') |
|
|
callTrigger('bringClientDataTrigger') |
|
|
callTrigger('endWaitingModeTrigger') |
|
|
|
|
426 |
runForm ('clientSelect.gfd', {'data': clientResultBlock, 'callback': callback}) |
runForm ('clientSelect.gfd', {'data': clientResultBlock, 'callback': callback}) |
427 |
elif recordCount == 1: |
elif recordCount == 1: |
428 |
clientResultBlock.jumpRecord(0) |
callback (0) |
|
ownDocumentBlock.clientRecipientBox.clientCodeEntry = str(clientResultBlock.uidEntry) |
|
|
ownDocumentBlock.clientRecipientBox.clientNameEntry = str(clientResultBlock.nameEntry) |
|
|
ownDocumentBlock.clientRecipientBox.clientEntry = str(clientResultBlock.idEntry) |
|
|
callTrigger('startWaitingModeTrigger') |
|
|
callTrigger('bringClientDataTrigger') |
|
|
callTrigger('endWaitingModeTrigger') |
|
429 |
|
|
430 |
]]></trigger> |
]]></trigger> |
431 |
|
|
432 |
<block datasource="ownDocumentDataSource" name="ownDocumentBlock" restrictInsert=""> |
<block datasource="ownDocumentDataSource" name="ownDocumentBlock" restrictInsert=""> |
433 |
<entry field="id" hidden="" name="idEntry" x="1" y="1"/> |
<entry field="id" hidden="" name="idEntry" x="1" y="1"/> |
434 |
<entry field="own_entity" hidden="" name="ownPosEntityIdEntry" x="1" y="1"/> |
<entry field="own_entity" hidden="" name="ownPosEntityIdEntry" x="1" y="1"/> |
435 |
<entry field="own_document_type" hidden="" name="typeEntry" default="21" x="1" y="1"/> |
<!-- nebulize that '21' --> |
436 |
|
<entry field="own_document_type" hidden="y" name="typeEntry" default="21" x="1" y="1"/> |
437 |
<box height="6" label="Datos del Cliente" name="clientRecipientBox" width="103" x="0" y="2"> |
<box height="6" label="Datos del Cliente" name="clientRecipientBox" width="103" x="0" y="2"> |
438 |
|
|
439 |
<label name="clientLbl" text="Cliente" x="1" y="1" /> |
<label name="clientLbl" text="Cliente" x="1" y="1" /> |
440 |
|
|
441 |
<entry x="1" y="1" width="30" name="currentClientEntry" hidden="" /> |
<entry x="1" y="1" width="30" name="currentClientEntry" hidden="" /> |
442 |
<entry x="1" y="2" field="recipient" name="clientEntry" width="30" hidden=""/> |
<entry x="1" y="2" field="recipient" name="clientEntry" width="30" hidden=""/> |
443 |
<entry x="1" y="2" name="clientCodeEntry" width="20"> |
<entry x="1" y="2" name="clientCodeEntry" width="20"> |
444 |
<options> |
<options> |
445 |
<option name="tip" value="Insertar el Código"/> |
<option name="tip" value="Insertar el Código"/> |
446 |
</options> |
</options> |
447 |
</entry> |
</entry> |
448 |
<entry x="21" y="2" name="clientNameEntry" width="35"> |
<entry x="21" y="2" name="clientNameEntry" width="35"> |
449 |
<options> |
<options> |
450 |
<option name="tip" value="Insertar el nombre o descripción"/> |
<option name="tip" value="Insertar el nombre o descripción"/> |
451 |
</options> |
</options> |
452 |
</entry> |
</entry> |
453 |
|
|
454 |
<button name="clientSearchButton" trigger="clientSearchTrigger" label="Buscar" width="7" height="1" x="56" y="2"/> |
<button name="clientSearchButton" trigger="clientSearchTrigger" label="Buscar" width="7" height="1" x="56" y="2"/> |
455 |
<button name="clientCallFormButton" trigger="clientCallFormTrigger" label="..." width="4" height="1" x="64" y="2"/> |
<button name="clientCallFormButton" trigger="clientCallFormTrigger" label="..." width="4" height="1" x="64" y="2"/> |
456 |
|
|
457 |
<label name="clientLbl" text="Lista de precios:" x="1" y="4" /> |
<label name="clientLbl" text="Lista de precios:" x="1" y="4" /> |
458 |
|
|
459 |
<entry x="19" y="4" field="recipient" name="priceTypeEntry" readonly="" |
<entry x="19" y="4" field="recipient" name="priceTypeEntry" readonly="" |
460 |
width="20" style="textlookup" foreign_key="clientDataSource._entity_data.id" |
width="20" style="textlookup" foreign_key="clientDataSource._entity_data.id" |
461 |
foreign_key_description="_price_type_data.name" /> |
foreign_key_description="_price_type_data.name" /> |
462 |
|
|
463 |
</box> |
</box> |
464 |
<entry field="date" name="dateEntry" style="label" hidden="" typecast="date" |
<entry field="date" name="dateEntry" style="label" hidden="" typecast="date" |
479 |
<neb:Sub neb:src="posDocument.nebc" documentType="ownDocumentBlock.typeEntry" |
<neb:Sub neb:src="posDocument.nebc" documentType="ownDocumentBlock.typeEntry" |
480 |
ownPosDocumentBlock="ownPosDocumentBlock" documentNumberEntry="documentNumberEntry" |
ownPosDocumentBlock="ownPosDocumentBlock" documentNumberEntry="documentNumberEntry" |
481 |
documentNumberEntryX="65" documentNumberEntryY="1" |
documentNumberEntryX="65" documentNumberEntryY="1" |
482 |
searchNextDocumentNumber="searchNextReturnNoteNumber" > |
searchNextDocumentNumber="searchNextReturnNoteNumber" > |
483 |
</neb:Sub> |
</neb:Sub> |
484 |
|
|
485 |
</box> |
</box> |
486 |
|
|
487 |
<!-- ******************************** --> |
<!-- ******************************** --> |
592 |
ownItemBlock.bonusEntry = 0.00 |
ownItemBlock.bonusEntry = 0.00 |
593 |
ownItemBlock.itemTotalEntry = 0.00 |
ownItemBlock.itemTotalEntry = 0.00 |
594 |
|
|
595 |
|
# ownItemBlock.deleteRecord () |
596 |
callTrigger('totalCalcTrigger') |
callTrigger('totalCalcTrigger') |
597 |
</trigger> |
</trigger> |
598 |
|
|
711 |
<label name="qtyLbl" text="Cantidad" x="45" y="10"/> |
<label name="qtyLbl" text="Cantidad" x="45" y="10"/> |
712 |
<!-- mdione's bookmark --> |
<!-- mdione's bookmark --> |
713 |
<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"> |
714 |
<trigger name="qtyEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
<trigger name="qtyEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
715 |
</entry> |
</entry> |
716 |
|
|
717 |
<label name="priceLbl" text="Precio" x="56" y="10"/> |
<label name="priceLbl" text="Precio" x="56" y="10"/> |
724 |
|
|
725 |
|
|
726 |
<label name="ivaLbl" text="IVA" x="66" y="10"/> |
<label name="ivaLbl" text="IVA" x="66" y="10"/> |
727 |
|
<!--entry name="ivaEntry" displaymask="%0.0f" |
728 |
|
rows="10" width="3" x="66" y="11" default="0"--> |
729 |
<entry name="ivaEntry" displaymask="%0.0f" |
<entry name="ivaEntry" displaymask="%0.0f" |
730 |
rows="10" width="3" x="66" y="11" default="0"> |
rows="10" width="3" x="66" y="11"> |
731 |
<trigger name="ivaEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
<trigger name="ivaEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
732 |
</entry> |
</entry> |
733 |
<label name="discountLbl" text="Dto." x="70" y="10"/> |
<label name="discountLbl" text="Dto." x="70" y="10"/> |
734 |
<entry field="own_item.discount" name="discountEntry" default="0.00" typecast="number" displaymask="%0.2f" |
<!--entry field="own_item.discount" name="discountEntry" default="0.00" typecast="number" displaymask="%0.2f" |
735 |
|
rows="10" width="6" x="69" y="11"--> |
736 |
|
<entry field="own_item.discount" name="discountEntry" typecast="number" displaymask="%0.2f" |
737 |
rows="10" width="6" x="69" y="11"> |
rows="10" width="6" x="69" y="11"> |
738 |
<trigger name="discountEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
<trigger name="discountEntryPreFocusout" type="PRE-FOCUSOUT" src="totalCalcTrigger" /> |
739 |
</entry> |
</entry> |
740 |
<!-- <label name="bonusLbl" text="Bonif." x="79" y="10"/> --> |
<!-- <label name="bonusLbl" text="Bonif." x="79" y="10"/> --> |
741 |
<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" |
742 |
|
rows="10" width="10" x="79" y="11" hidden=""/--> |
743 |
|
<entry field="own_item.bonus" name="bonusEntry" style="label" typecast="number" displaymask="%0.2f" |
744 |
rows="10" width="10" x="79" y="11" hidden=""/> |
rows="10" width="10" x="79" y="11" hidden=""/> |
745 |
<label name="itemNetolLbl" text="Neto" x="76" y="10"/> |
<label name="itemNetolLbl" text="Neto" x="76" y="10"/> |
746 |
<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" |
747 |
|
rows="10" width="10" x="76" y="11"/--> |
748 |
|
<entry name="itemNetoEntry" style="label" typecast="number" displaymask="%0.2f" |
749 |
rows="10" width="10" x="76" y="11"/> |
rows="10" width="10" x="76" y="11"/> |
750 |
<label name="itemTotalLbl" text="Total" x="85" y="10"/> |
<label name="itemTotalLbl" text="Total" x="85" y="10"/> |
751 |
<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" |
752 |
|
rows="10" width="10" x="85" y="11"--> |
753 |
|
<entry name="itemTotalEntry" style="label" typecast="number" displaymask="%0.2f" |
754 |
rows="10" width="10" x="85" y="11"> |
rows="10" width="10" x="85" y="11"> |
755 |
</entry> |
</entry> |
756 |
<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"/> |