1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
<?xml version="1.0" encoding="ISO-8859-1"?> |
2 |
|
|
3 |
<form tabbed="top" title="Productos" height="19" width="70"> |
<form tabbed="top" title="Productos" height="19" width="70"> |
4 |
|
<neb:Block> |
5 |
|
use PAPO; |
6 |
|
my $uniqed=0; |
7 |
|
</neb:Block> |
8 |
<!-- <maintoolbar enabled=""/> --> |
<!-- <maintoolbar enabled=""/> --> |
9 |
<datasource name="focusDataSource" cache="1"/> |
<datasource name="focusDataSource" cache="1"/> |
10 |
<datasource name="searchDataSource" cache="1"/> |
<datasource name="searchDataSource" cache="1"/> |
103 |
<!-- lo mismo que arriba, el anterior es para buscar, este para |
<!-- lo mismo que arriba, el anterior es para buscar, este para |
104 |
ABM de uno en particular (segunda pantaia) --> |
ABM de uno en particular (segunda pantaia) --> |
105 |
<datasource name="productDataSource" database="papo" |
<datasource name="productDataSource" database="papo" |
106 |
table="product, _product_data, price, _price_data, product_code, _product_code_data, product_tax, _product_tax_data, product_store, _product_store_data" |
table="product, _product_data, price, _price_data, product_code, _product_code_data, product_tax, _product_tax_data" |
107 |
historytable="_product_data, _price_data, _product_code_data, _product_tax_data, _product_store_data" |
historytable="_product_data, _price_data, _product_code_data, _product_tax_data" |
108 |
order_by="_product_data.canonical_name,_product_code_data.code"> |
order_by="_product_data.canonical_name,_product_code_data.code"> |
109 |
<condition> |
<condition> |
110 |
<and> |
<and> |
174 |
<cfield name="_product_tax_data.tax"/> |
<cfield name="_product_tax_data.tax"/> |
175 |
<cconst value="1"/> |
<cconst value="1"/> |
176 |
</eq> |
</eq> |
|
<!-- pega product con product_store --> |
|
|
<eq> |
|
|
<cfield name="product.id"/> |
|
|
<cfield name="_product_store_data.product"/> |
|
|
</eq> |
|
|
<!-- pega product_store con su _data --> |
|
|
<eq> |
|
|
<cfield name="product_store.id"/> |
|
|
<cfield name="_product_store_data._table"/> |
|
|
</eq> |
|
|
<!-- descarta product_stores muertos --> |
|
|
<null> |
|
|
<cfield name="_product_store_data._end_t"/> |
|
|
</null> |
|
177 |
<!-- FALTA: product_store.storehouse --> |
<!-- FALTA: product_store.storehouse --> |
178 |
</and> |
</and> |
179 |
</condition> |
</condition> |
218 |
</condition> |
</condition> |
219 |
</datasource> |
</datasource> |
220 |
|
|
221 |
|
<trigger name="startUp" type="On-Startup"> |
222 |
|
#cargo el own-pos entity id |
223 |
|
callTrigger('searchOwnPosData') |
224 |
|
</trigger> |
225 |
|
|
226 |
<trigger name="startWaitingModeTrigger" type="NAMED"><![CDATA[ |
<trigger name="startWaitingModeTrigger" type="NAMED"><![CDATA[ |
227 |
setStatusText("Procesando ...") |
setStatusText("Procesando ...") |
228 |
try: |
try: |
270 |
line += "-" |
line += "-" |
271 |
table.append(line) |
table.append(line) |
272 |
|
|
273 |
|
productCondition = GConditions.GConditions() |
274 |
|
tmpAnd = GConditions.GCand(productCondition) |
275 |
if str(productSearchBlock.searchCodeEntry) or str(productSearchBlock.searchNameEntry): |
if str(productSearchBlock.searchCodeEntry) or str(productSearchBlock.searchNameEntry): |
276 |
productCondition = GConditions.GConditions() |
if str(productSearchBlock.searchCodeEntry): |
277 |
tmpAnd = GConditions.GCand(productCondition) |
eq1 = GConditions.GClike(tmpAnd) |
278 |
if str(productSearchBlock.searchCodeEntry): |
GConditions.GCField(eq1,"_entity_uid_data.uid") |
279 |
eq1 = GConditions.GClike(tmpAnd) |
GConditions.GCConst(eq1,str(productSearchBlock.searchCodeEntry)+'%') |
280 |
GConditions.GCField(eq1,"_entity_uid_data.uid") |
if str(productSearchBlock.searchNameEntry): |
281 |
GConditions.GCConst(eq1,str(productSearchBlock.searchCodeEntry)+'%') |
eq2 = GConditions.GClike(tmpAnd) |
282 |
if str(productSearchBlock.searchNameEntry): |
GConditions.GCField(eq2,"_entity_data.name") |
283 |
eq2 = GConditions.GClike(tmpAnd) |
GConditions.GCConst(eq2,str(productSearchBlock.searchNameEntry)+'%') |
284 |
GConditions.GCField(eq2,"_entity_data.name") |
|
285 |
GConditions.GCConst(eq2,str(productSearchBlock.searchNameEntry)+'%') |
eq3 = GConditions.GClike(tmpAnd) |
286 |
productResulSet = printProductDataSource.createResultSet(productCondition) |
GConditions.GCField(eq3,"_product_store_data.storehouse") |
287 |
else: |
GConditions.GCConst(eq3,str(ownStorehouseBlock.ownStorehouseIdEntry)) |
288 |
productResulSet = printProductDataSource.createResultSet() |
|
289 |
|
productResulSet = printProductDataSource.createResultSet(productCondition) |
290 |
more = productResulSet.firstRecord(); |
more = productResulSet.firstRecord(); |
291 |
|
|
292 |
while more: |
while more: |
325 |
except DBError, err: |
except DBError, err: |
326 |
rollbackConnection() |
rollbackConnection() |
327 |
genericBox("Hay problemas para grabar los datos del producto\n"+str(err),['Aceptar']) |
genericBox("Hay problemas para grabar los datos del producto\n"+str(err),['Aceptar']) |
328 |
productBlock.jumpRecord(2) |
#productBlock.jumpRecord(2) |
329 |
else: |
else: |
330 |
try: |
try: |
331 |
productBlock.postChanges() |
productBlock.postChanges() |
412 |
</block> |
</block> |
413 |
</page> |
</page> |
414 |
<page name="Gestión"> |
<page name="Gestión"> |
415 |
|
<neb:Sub neb:src="posDocument.nebc" ownPosBlock="ownPosBlock" |
416 |
|
ownPosEntityIdEntry="ownPosEntityIdEntry" |
417 |
|
searchOwnPosData="searchOwnPosData" |
418 |
|
ownStorehouseBlock ="ownStorehouseBlock" ownStorehouseIdEntry="ownStorehouseIdEntry" /> |
419 |
|
|
420 |
<!-- new_schema_begin --> |
<!-- new_schema_begin --> |
421 |
<block name="searchingProductClassificationBlock" datasource="productClassificationDataSource"> |
<block name="searchingProductClassificationBlock" datasource="productClassificationDataSource"> |
422 |
<entry name="idEntry" field="_table" |
<entry name="idEntry" field="_table" |