368 |
|
|
369 |
</page> |
</page> |
370 |
<page name="Cliente"> |
<page name="Cliente"> |
371 |
<trigger type="Pre-Focusout" src="askForChangesTrigger"/> |
<!-- new_schema_begin --> |
372 |
|
<block name="searchingPriceTypeBlock" datasource="priceTypeDataSource"> |
373 |
|
<entry name="idEntry" field="_table" |
374 |
|
x="1" y="1" hidden="y"/> |
375 |
|
<entry name="nameEntry" field="name" |
376 |
|
x="1" y="1" hidden="y"/> |
377 |
|
</block> |
378 |
|
<trigger type="Pre-Focusin"> |
379 |
|
<!-- this is needed for updating some fields, like price_type there below --> |
380 |
|
if str(clientBlock.priceTypeEntry)!='': |
381 |
|
# look for the name... |
382 |
|
searchingPriceTypeBlock.processRollback () |
383 |
|
searchingPriceTypeBlock.initQuery () |
384 |
|
searchingPriceTypeBlock.idEntry= str(clientBlock.priceTypeEntry) |
385 |
|
searchingPriceTypeBlock.processQuery () |
386 |
|
|
387 |
|
# ... and show it |
388 |
|
showPriceTypeNameBlock.newRecord () |
389 |
|
showPriceTypeNameBlock.priceTypeNameEntry= str(searchingPriceTypeBlock.nameEntry) |
390 |
|
showPriceTypeNameBlock.commit () |
391 |
|
</trigger> |
392 |
|
<!-- new_schema_end --> |
393 |
|
<trigger type="Pre-Focusout" src="askForChangesTrigger"/> |
394 |
<box label="Datos" |
<box label="Datos" |
395 |
x="0" y="0" height="20" width="64"> |
x="0" y="0" height="20" width="64"> |
396 |
<block name="clientBlock" datasource="clientDataSource" restrictInsert="y"> |
<block name="clientBlock" datasource="clientDataSource" restrictInsert="y"> |
406 |
x="1" y="4" width="10"/> |
x="1" y="4" width="10"/> |
407 |
<label text="Lista de precios asociada " |
<label text="Lista de precios asociada " |
408 |
x="1" y="5"/> |
x="1" y="5"/> |
409 |
<entry x="1" y="6" field="_client_data.price_type" |
<!-- entry x="1" y="6" field="_client_data.price_type" |
410 |
name="priceTypeEntry" |
name="priceTypeEntry" |
411 |
width="35" style="dropdown" foreign_key="priceTypeDataSource._table" |
width="35" style="dropdown" foreign_key="priceTypeDataSource._table" |
412 |
foreign_key_description="name"/> |
foreign_key_description="name"/ --> |
413 |
|
<entry name="priceTypeEntry" field="_client_data.price_type" |
414 |
|
x="1" y="1" hidden="y"/> |
415 |
<button x="37" y="6" width="5" trigger="callPriceTypeTrigger" |
<button x="37" y="6" width="5" trigger="callPriceTypeTrigger" |
416 |
label=" ... " name="priceTypeBtn" height="1"> |
label="Buscar" name="priceTypeBtn" height="1"> |
417 |
<trigger type="NAMED" name="callPriceTypeTrigger"> |
<!-- new_schema_begin --> |
418 |
#runForm('priceType-new.gfd', {'initId': str(clientBlock.priceTypeEntry)}) |
<trigger type="NAMED" name="callPriceTypeTrigger"> |
419 |
runForm('priceType.gfd') |
def setPriceType (recNo): |
420 |
</trigger> |
if recNo>=0: |
421 |
|
searchingPriceTypeBlock.jumpRecord (recNo) |
422 |
|
clientBlock.priceTypeEntry= str(searchingPriceTypeBlock.idEntry) |
423 |
|
showPriceTypeNameBlock.priceTypeNameEntry= str(searchingPriceTypeBlock.nameEntry) |
424 |
|
|
425 |
|
# look for the name... |
426 |
|
searchingPriceTypeBlock.processRollback () |
427 |
|
searchingPriceTypeBlock.initQuery () |
428 |
|
searchingPriceTypeBlock.nameEntry= str(showPriceTypeNameBlock.priceTypeNameEntry)+'%' |
429 |
|
searchingPriceTypeBlock.processQuery () |
430 |
|
|
431 |
|
# are there too much results? |
432 |
|
resultCount= searchingPriceTypeBlock.getRecordCount () |
433 |
|
if resultCount>1: |
434 |
|
# do the select-man |
435 |
|
runForm ('priceTypeSelect.gfd', { |
436 |
|
'data': searchingPriceTypeBlock, |
437 |
|
'callback': setPriceType |
438 |
|
}) |
439 |
|
elif resultCount==1: |
440 |
|
setPriceType (0) |
441 |
|
|
442 |
|
</trigger> |
443 |
|
<!-- new_schema_end --> |
444 |
</button> |
</button> |
445 |
<label text="Observaciones" |
<label text="Observaciones" |
446 |
x="1" y="7"/> |
x="1" y="7"/> |
459 |
setFocus (clientBlock.nameEntry) |
setFocus (clientBlock.nameEntry) |
460 |
</trigger> |
</trigger> |
461 |
</button> |
</button> |
462 |
</block> |
</block> |
463 |
|
|
464 |
|
<!-- new_schema_begin --> |
465 |
|
<datasource name="showNames" cache="1"/> |
466 |
|
<block name="showPriceTypeNameBlock" datasource="showNames"> |
467 |
|
<entry name="priceTypeNameEntry" field="priceTypeName" |
468 |
|
x="1" y="6" width="35"/> |
469 |
|
</block> |
470 |
|
<!-- new_schema_end --> |
471 |
</box> |
</box> |
472 |
</page> |
</page> |
473 |
|
|
482 |
x="1" y="2" width="40"> |
x="1" y="2" width="40"> |
483 |
</entry> |
</entry> |
484 |
</block> |
</block> |
485 |
</box> |
</box> |
486 |
<box label="Direcciones" |
<box label="Direcciones" |
487 |
x="0" y="5" height="15" width="64"> |
x="0" y="5" height="15" width="64"> |
488 |
<block name="addressBlock" datasource="addressDataSource"> |
<block name="addressBlock" datasource="addressDataSource"> |