41 |
</condition> |
</condition> |
42 |
</datasource> |
</datasource> |
43 |
|
|
44 |
|
<!--busqueda de storehouse--> |
45 |
|
<datasource name="ownStorehowseResultDataSource" database="papo" |
46 |
|
table="_entity_relation_data, _relation_types_data"> |
47 |
|
<condition> |
48 |
|
<and> |
49 |
|
<eq> |
50 |
|
<cfield name="_entity_relation_data._table"/> |
51 |
|
<cfield name="_relation_types_data.entity_relation"/> |
52 |
|
</eq> |
53 |
|
<eq> |
54 |
|
<cfield name="_relation_types_data.relation_type"/> |
55 |
|
<cconst value="neb:PAPO::storehouseOfBranchType"/> |
56 |
|
</eq> |
57 |
|
<null> |
58 |
|
<cfield name="_entity_relation_data._end_t"/> |
59 |
|
</null> |
60 |
|
<null> |
61 |
|
<cfield name="_relation_types_data._end_t"/> |
62 |
|
</null> |
63 |
|
</and> |
64 |
|
</condition> |
65 |
|
</datasource> |
66 |
|
<!--/busqueda de storehouse--> |
67 |
|
|
68 |
<!--abm --> |
<!--abm --> |
69 |
<datasource name="ownPosDataSource" database="papo" table="entity, _entity_data, own_entity, _own_entity_data, own_pos, _own_pos_data" historytable="_entity_data, _own_entity_data, _own_pos_data" > |
<datasource name="ownPosDataSource" database="papo" table="entity, _entity_data, own_entity, _own_entity_data, own_pos, _own_pos_data" historytable="_entity_data, _own_entity_data, _own_pos_data" > |
70 |
<condition> |
<condition> |
158 |
ownPosBlock.initQuery() |
ownPosBlock.initQuery() |
159 |
ownPosBlock.ownPosEntityIdEntry = str(editBlock.posEntityIdEntry) |
ownPosBlock.ownPosEntityIdEntry = str(editBlock.posEntityIdEntry) |
160 |
ownPosBlock.processQuery() |
ownPosBlock.processQuery() |
161 |
|
|
162 |
# busco entity_relation |
# busco entity_relation |
163 |
entityRelationBlock.initQuery() |
entityRelationBlock.initQuery() |
164 |
entityRelationBlock.entityRelationToEntry = str(ownPosBlock.ownPosEntityIdEntry) |
entityRelationBlock.entityRelationToEntry = str(ownPosBlock.ownPosEntityIdEntry) |
170 |
relationTypesBlock.entityRelationEntry = str(entityRelationBlock.entityRelationIdEntry) |
relationTypesBlock.entityRelationEntry = str(entityRelationBlock.entityRelationIdEntry) |
171 |
relationTypesBlock.relationTypeEntry = <neb:Inline>'"'.PAPO::posOfType.'"'</neb:Inline> |
relationTypesBlock.relationTypeEntry = <neb:Inline>'"'.PAPO::posOfType.'"'</neb:Inline> |
172 |
relationTypesBlock.processQuery() |
relationTypesBlock.processQuery() |
173 |
|
else : |
174 |
|
# busco el storehouse |
175 |
|
ownStorehouseBlock.initQuery() |
176 |
|
ownStorehouseBlock.ownBranchIdEntry =str(masterBlock.branchIdEntry) |
177 |
|
ownStorehouseBlock.processQuery() |
178 |
|
print "storehouse:" |
179 |
|
print str(ownStorehouseBlock.ownStorehouseIdEntry) |
180 |
|
print "branch:" |
181 |
|
print str(masterBlock.branchIdEntry) |
182 |
# le cargo el nombre de branch y de organization |
# le cargo el nombre de branch y de organization |
183 |
docOrgBlock.ownBranchNameEntry = str(masterBlock.branchNameEntry) |
docOrgBlock.ownBranchNameEntry = str(masterBlock.branchNameEntry) |
184 |
orgDataSource.createResultSet() |
orgDataSource.createResultSet() |
203 |
entityTypesBlock.ownPosEntityTypeEntry = <neb:Inline>'"'.PAPO::ownPosType.'"'</neb:Inline> |
entityTypesBlock.ownPosEntityTypeEntry = <neb:Inline>'"'.PAPO::ownPosType.'"'</neb:Inline> |
204 |
# this one's a detail :-\ |
# this one's a detail :-\ |
205 |
ownPosBlock.postChanges () |
ownPosBlock.postChanges () |
|
|
|
206 |
commitState= 2 |
commitState= 2 |
207 |
# cargo la entity_relation y el id del branch al que pertenece |
# cargo la entity_relation y el id del branch al que pertenece |
208 |
entityRelationBlock.entityRelationFromEntry = str(masterBlock.branchIdEntry) |
entityRelationBlock.entityRelationFromEntry = str(masterBlock.branchIdEntry) |
209 |
entityRelationBlock.entityRelationToEntry = str(ownPosBlock.ownPosEntityIdEntry) |
entityRelationBlock.entityRelationToEntry = str(ownPosBlock.ownPosEntityIdEntry) |
|
entityRelationBlock.entityRelationIdEntry.autofillBySequence('entity_relation_id_seq') |
|
|
print "numero de entity relation:" |
|
|
print str(entityRelationBlock.entityRelationIdEntry) |
|
210 |
entityRelationBlock.postChanges() |
entityRelationBlock.postChanges() |
211 |
|
#print "numero de entity relation:" |
212 |
|
#print str(entityRelationBlock.entityRelationIdEntry) |
213 |
commitState= 3 |
commitState= 3 |
214 |
# cargo relation_types |
# cargo relation_types |
215 |
relationTypesBlock.entityRelationEntry = str(entityRelationBlock.entityRelationIdEntry) |
relationTypesBlock.entityRelationEntry = str(entityRelationBlock.entityRelationIdEntry) |
216 |
relationTypesBlock.relationTypeEntry = <neb:Inline>'"'.PAPO::posOfType.'"'</neb:Inline> |
relationTypesBlock.relationTypeEntry = <neb:Inline>'"'.PAPO::posOfType.'"'</neb:Inline> |
217 |
relationTypesBlock.postChanges () |
relationTypesBlock.postChanges () |
218 |
|
# cargo la entity_relation y el id del storehouse asociado |
219 |
|
entityRelationBlock.newRecord() |
220 |
|
entityRelationBlock.entityRelationFromEntry = str(ownStorehouseBlock.ownStorehouseIdEntry) |
221 |
|
entityRelationBlock.entityRelationToEntry = str(ownPosBlock.ownPosEntityIdEntry) |
222 |
|
#entityRelationBlock.entityRelationIdEntry.autofillBySequence('entity_relation_id_seq') |
223 |
|
entityRelationBlock.postChanges() |
224 |
|
#print "numero de entity relation:" |
225 |
|
#print str(entityRelationBlock.entityRelationIdEntry) |
226 |
|
commitState= 3 |
227 |
|
# cargo relation_types |
228 |
|
relationTypesBlock.newRecord() |
229 |
|
relationTypesBlock.entityRelationEntry = str(entityRelationBlock.entityRelationIdEntry) |
230 |
|
relationTypesBlock.relationTypeEntry = <neb:Inline>'"'.PAPO::posOfStorehouseType.'"'</neb:Inline> |
231 |
|
relationTypesBlock.postChanges () |
232 |
commitState= 4 |
commitState= 4 |
233 |
# cargo los documentos típicos |
# cargo los documentos típicos |
234 |
<neb:Block>my $numero = 0; foreach(PAPO::ownPosDocuments) {</neb:Block> |
<neb:Block>my $numero = 0; foreach(PAPO::ownPosDocuments) {</neb:Block> |
262 |
|
|
263 |
<trigger type="ON-EXIT"> |
<trigger type="ON-EXIT"> |
264 |
# quick: what's this for? |
# quick: what's this for? |
265 |
print "saliendo" |
# this is for refresh The pos list in ownBranch.gfd |
266 |
func= getParameter('callback') |
func= getParameter('callback') |
|
print "saliendo" |
|
267 |
func() |
func() |
|
print "saliendo" |
|
268 |
</trigger> |
</trigger> |
269 |
<!-- Gestión --> |
<!-- Gestión --> |
270 |
<page name="Gestión"> |
<page name="Gestión"> |
312 |
<entry name="entityRelationEntry" field="_relation_types_data.entity_relation" x="70" y="6" hidden=""/> |
<entry name="entityRelationEntry" field="_relation_types_data.entity_relation" x="70" y="6" hidden=""/> |
313 |
</block> |
</block> |
314 |
<!--/entity relation--> |
<!--/entity relation--> |
315 |
|
<!--busqueda de storehouse --> |
316 |
|
<block name="ownStorehouseBlock" datasource="ownStorehowseResultDataSource" > |
317 |
|
<entry name="ownStorehouseIdEntry" |
318 |
|
field="_entity_relation_data.entity_to" x="70" hidden="" y="5" /> |
319 |
|
<entry name="ownBranchIdEntry" |
320 |
|
field="_entity_relation_data.entity_from" x="70" hidden="" y="6" /> |
321 |
|
</block> |
322 |
|
<!--/busqueda de storehouse --> |
323 |
</page> |
</page> |
324 |
<!-- DOCUMENTOS DEL PUNTO DE VENTA --> |
<!-- DOCUMENTOS DEL PUNTO DE VENTA --> |
325 |
|
|
326 |
<page name="Documentos"> |
<page name="Documentos"> |
327 |
<datasource name="posDocDataSource" database="papo" table="own_pos_document, _own_pos_document_data" historytable="_own_pos_document_data" |
<datasource name="posDocDataSource" database="papo" table="own_pos_document, _own_pos_document_data" historytable="_own_pos_document_data" |
328 |
master="ownPosDataSource" masterlink="entity.id" detaillink="_own_pos_document_data.own_pos"> |
master="ownPosDataSource" masterlink="entity.id" detaillink="_own_pos_document_data.own_pos"> |