223 |
<cfield name="_entity_uid_data.entity_uid_type"/> |
<cfield name="_entity_uid_data.entity_uid_type"/> |
224 |
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
225 |
</eq> |
</eq> |
226 |
|
<null> |
227 |
|
<cfield name="_entity_data._end_t"/> |
228 |
|
</null> |
229 |
|
<null> |
230 |
|
<cfield name="_entity_uid_data._end_t"/> |
231 |
|
</null> |
232 |
</and> |
</and> |
233 |
</condition> |
</condition> |
234 |
</datasource> |
</datasource> |
235 |
|
|
|
<!-- <neb:Sub neb:src="datasource.nebc" search="alien_entity" dated="entity=alien_entity" --> |
|
|
<!-- name="FooDB" database="papo" order_by="_entity_data.name"> --> |
|
|
<!-- </neb:Sub> --> |
|
|
<!-- <and> --> |
|
|
<!-- <le> --> |
|
|
<!-- <cfield name="_alien_entity_data._start_t"></cfield> --> |
|
|
<!-- <cfield name="_entity_data._start_t"></cfield> --> |
|
|
<!-- </le> --> |
|
|
<!-- <or> --> |
|
|
<!-- <null> --> |
|
|
<!-- <cfield name="_alien_entity_data._end_t"></cfield> --> |
|
|
<!-- </null> --> |
|
|
<!-- <le> --> |
|
|
<!-- <cfield name="_entity_data._end_t"></cfield> --> |
|
|
<!-- <cfield name="_alien_entity_data._end_t"></cfield> --> |
|
|
<!-- </le> --> |
|
|
<!-- </or> --> |
|
|
<!-- </and> --> |
|
|
|
|
236 |
<datasource name="providerNameDataSource" database="papo" |
<datasource name="providerNameDataSource" database="papo" |
237 |
table="_entity_data"> |
table="_entity_data"> |
238 |
|
<conditions> |
239 |
|
<null> |
240 |
|
<cfield name="_entity_data._end_t"/> |
241 |
|
</null> |
242 |
|
</conditions> |
243 |
</datasource> |
</datasource> |
244 |
|
|
245 |
<datasource name="transportUIDDataSource" database="papo" |
<datasource name="transportUIDDataSource" database="papo" |
258 |
<cfield name="_entity_uid_data.entity_uid_type"/> |
<cfield name="_entity_uid_data.entity_uid_type"/> |
259 |
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
<cfield name="entity_type_uid_conf.entity_uid_type"/> |
260 |
</eq> |
</eq> |
261 |
|
<null> |
262 |
|
<cfield name="_entity_data._end_t"/> |
263 |
|
</null> |
264 |
|
<null> |
265 |
|
<cfield name="_entity_uid_data._end_t"/> |
266 |
|
</null> |
267 |
</and> |
</and> |
268 |
</condition> |
</condition> |
269 |
</datasource> |
</datasource> |
270 |
|
|
271 |
<datasource name="transportNameDataSource" database="papo" |
<datasource name="transportNameDataSource" database="papo" |
272 |
table="_entity_data"> |
table="_entity_data"> |
273 |
|
<conditions> |
274 |
|
<null> |
275 |
|
<cfield name="_entity_data._end_t"/> |
276 |
|
</null> |
277 |
|
</conditions> |
278 |
</datasource> |
</datasource> |
279 |
|
|
280 |
<datasource name="transportDataSource" database="papo" |
<datasource name="transportDataSource" database="papo" |
523 |
</condition> |
</condition> |
524 |
</datasource> |
</datasource> |
525 |
|
|
526 |
<datasource database="papo" name="alienDocumentShowDataSource" table="alien_document" |
<datasource database="papo" name="alienDocumentShowDataSource" |
527 |
|
table="alien_document, _entity_data as provider, _entity_data as transport" |
528 |
order_by="date"> |
order_by="date"> |
529 |
<condition> |
<condition> |
530 |
<or> |
<and> |
531 |
<eq> |
<eq> |
532 |
<cfield name="alien_document.alien_document_type"/> |
<cfield name="alien_document.sender"/> |
533 |
<cconst value="18"/> |
<cfield name="provider.id"/> |
534 |
</eq> |
</eq> |
535 |
<eq> |
<eq> |
536 |
<cfield name="alien_document.alien_document_type"/> |
<cfield name="alien_document.transport"/> |
537 |
<cconst value="19"/> |
<cfield name="transport.id"/> |
538 |
</eq> |
</eq> |
539 |
<eq> |
<or> |
540 |
<cfield name="alien_document.alien_document_type"/> |
<eq> |
541 |
<cconst value="20"/> |
<cfield name="alien_document.alien_document_type"/> |
542 |
</eq> |
<cconst value="18"/> |
543 |
</or> |
</eq> |
544 |
|
<eq> |
545 |
|
<cfield name="alien_document.alien_document_type"/> |
546 |
|
<cconst value="19"/> |
547 |
|
</eq> |
548 |
|
<eq> |
549 |
|
<cfield name="alien_document.alien_document_type"/> |
550 |
|
<cconst value="20"/> |
551 |
|
</eq> |
552 |
|
</or> |
553 |
|
</and> |
554 |
</condition> |
</condition> |
555 |
</datasource> |
</datasource> |
556 |
|
|
1098 |
alienItemShowBlock.firstRecord() |
alienItemShowBlock.firstRecord() |
1099 |
setParameter('creditNoteDate',str(alienDocumentShowBlock.dateEntry)) |
setParameter('creditNoteDate',str(alienDocumentShowBlock.dateEntry)) |
1100 |
|
|
|
import gnue.common.GConditions as GConditions |
|
|
|
|
|
providerCondition = GConditions.GCondition() |
|
|
|
|
|
tmpAnd = GConditions.GCand(providerCondition) |
|
|
eq = GConditions.GCeq(tmpAnd) |
|
|
GConditions.GCField(eq,"_entity_data.id") |
|
|
GConditions.GCConst(eq,str(alienDocumentShowBlock.providerEntry)) |
|
|
le = GConditions.GCle(tmpAnd) |
|
|
GConditions.GCField(le,"_entity_uid_data._start_t") |
|
|
GConditions.GCConst(le,str(alienDocumentShowBlock.dateEntry)) |
|
|
tmpOr = GConditions.GCor(tmpAnd) |
|
|
tmpNull = GConditions.GCnull(tmpOr) |
|
|
GConditions.GCField(tmpNull,"_entity_uid_data._end_t") |
|
|
le2 = GConditions.GCle(tmpOr) |
|
|
GConditions.GCConst(le2,str(alienDocumentShowBlock.dateEntry)) |
|
|
GConditions.GCField(le2,"_entity_uid_data._end_t") |
|
|
|
|
|
providerResultSet = providerUIDDataSource.createResultSet(providerCondition) |
|
|
result = providerResultSet.firstRecord() |
|
|
if result: |
|
|
alienDocumentShowBlock.providerCodeSEntry = providerResultSet.current.getField("_entity_uid_data.uid") |
|
|
|
|
|
transportCondition = GConditions.GCondition() |
|
|
|
|
|
tmpAnd = GConditions.GCand(transportCondition) |
|
|
eq = GConditions.GCeq(tmpAnd) |
|
|
GConditions.GCField(eq,"_entity_data.id") |
|
|
GConditions.GCConst(eq,str(alienDocumentShowBlock.transportEntry)) |
|
|
le = GConditions.GCle(tmpAnd) |
|
|
GConditions.GCField(le,"_entity_uid_data._start_t") |
|
|
GConditions.GCConst(le,str(alienDocumentShowBlock.dateEntry)) |
|
|
tmpOr = GConditions.GCor(tmpAnd) |
|
|
tmpNull = GConditions.GCnull(tmpOr) |
|
|
GConditions.GCField(tmpNull,"_entity_uid_data._end_t") |
|
|
le2 = GConditions.GCle(tmpOr) |
|
|
GConditions.GCConst(le2,str(alienDocumentShowBlock.dateEntry)) |
|
|
GConditions.GCField(le2,"_entity_uid_data._end_t") |
|
|
|
|
|
transportResultSet = transportUIDDataSource.createResultSet(transportCondition) |
|
|
result = transportResultSet.firstRecord() |
|
|
if result: |
|
|
alienDocumentShowBlock.transportCodeSEntry = transportResultSet.current.getField("_entity_uid_data.uid") |
|
|
|
|
|
#for index in range(recordCount): |
|
|
# alienItemShowBlock.taxPercentEntry = (hack.a2f(alienItemShowBlock.taxAmountEntry) / (hack.a2f(alienItemShowBlock.unitPriceEntry) * \ |
|
|
# hack.a2f(alienItemShowBlock.qtyEntry))) * 100 |
|
|
# if index != recordCount-1: |
|
|
# alienItemShowBlock.nextRecord() |
|
|
|
|
1101 |
</trigger> |
</trigger> |
1102 |
|
|
1103 |
<trigger name="providerTrigger" type="NAMED"> |
<trigger name="providerTrigger" type="NAMED"> |
1287 |
|
|
1288 |
<block datasource="alienDocumentShowDataSource" name="alienDocumentShowBlock" > |
<block datasource="alienDocumentShowDataSource" name="alienDocumentShowBlock" > |
1289 |
|
|
1290 |
<entry field="id" hidden="" name="idEntry" x="1" y="1"/> |
<entry field="alien_document.id" hidden="" name="idEntry" x="1" y="1"/> |
1291 |
<entry field="alien_document_type" hidden="" name="typeEntry" x="1" y="1"/> |
<entry field="alien_document.alien_document_type" hidden="" name="typeEntry" x="1" y="1"/> |
1292 |
|
|
1293 |
<label name="providerLbl" text="Proveedor" x="1" y="1" /> |
<label name="providerLbl" text="Proveedor" x="1" y="1" /> |
1294 |
<entry x="1" y="2" name="providerCodeSEntry" readonly="" width="20" style="label"/> |
<entry x="1" y="2" field="provider._table" name="providerCodeSEntry" readonly="" |
1295 |
<entry x="1" y="3" field="alien_document.sender" name="providerNameSEntry" readonly="" |
width="20" style="textlookup" foreign_key="providerUIDDataSource._entity_data._table" |
1296 |
width="35" style="textlookup" foreign_key="providerNameDataSource.id" |
foreign_key_description="_entity_uid_data.uid" > |
1297 |
|
</entry> |
1298 |
|
<entry x="1" y="3" field="provider._table" name="providerNameSEntry" readonly="" |
1299 |
|
width="35" style="textlookup" foreign_key="providerNameDataSource._table" |
1300 |
foreign_key_description="name" > |
foreign_key_description="name" > |
|
<!-- <entry x="1" y="3" name="providerNameSEntry" width="35"> --> |
|
1301 |
</entry> |
</entry> |
1302 |
<entry x="1" y="2" field="alien_document.sender" name="providerEntry" width="25" hidden="" /> |
<entry x="1" y="2" field="alien_document.sender" name="providerEntry" width="25" hidden="" /> |
1303 |
|
|
1304 |
<label name="transportLbl" text="Transporte" x="56" y="1" /> |
<label name="transportLbl" text="Transporte" x="56" y="1" /> |
1305 |
<entry x="56" y="2" name="transportCodeSEntry" readonly="" width="20" style="label"/> |
<entry x="56" y="2" field="transport._table" name="transportCodeSEntry" readonly="" |
1306 |
<entry x="56" y="3" field="alien_document.transport" name="transportNameSEntry" readonly="" |
width="20" style="textlookup" foreign_key="transportUIDDataSource._entity_data._table" |
1307 |
width="35" style="textlookup" foreign_key="transportNameDataSource.id" |
foreign_key_description="_entity_uid_data.uid" > |
1308 |
|
</entry> |
1309 |
|
<entry x="56" y="3" field="transport._table" name="transportNameSEntry" readonly="" |
1310 |
|
width="35" style="textlookup" foreign_key="transportNameDataSource._table" |
1311 |
foreign_key_description="name" > |
foreign_key_description="name" > |
1312 |
</entry> |
</entry> |
1313 |
|
|
1315 |
|
|
1316 |
|
|
1317 |
<label name="numberLbl" text="Número" x="1" y="8" /> |
<label name="numberLbl" text="Número" x="1" y="8" /> |
1318 |
<entry field="number" name="numberEntry" width="20" x="1" y="9" style="label"/> |
<entry field="alien_document.number" name="numberEntry" width="20" x="1" y="9" style="label"/> |
1319 |
|
|
1320 |
<label name="dateLbl" text="Fecha" x="22" y="8" /> |
<label name="dateLbl" text="Fecha" x="22" y="8" /> |
1321 |
<entry field="date" name="dateEntry" typecast="date" |
<entry field="alien_document.date" name="dateEntry" typecast="date" |
1322 |
rows="1" width="22" x="22" y="9" style="label"/> |
rows="1" width="22" x="22" y="9" style="label"/> |
1323 |
|
|
1324 |
<label name="creditNoteTypeLbl" text="Tipo" x="48" y="8" /> |
<label name="creditNoteTypeLbl" text="Tipo" x="48" y="8" /> |
1325 |
<entry name="creditNoteTypeEntry" width="4" x="48" y="9" readonly="t" style="label"/> |
<entry name="creditNoteTypeEntry" width="4" x="48" y="9" readonly="t" style="label"/> |
1326 |
|
|
1327 |
<label name="guideNumberLbl" text="Número de guía" x="53" y="8" /> |
<label name="guideNumberLbl" text="Número de guía" x="53" y="8" /> |
1328 |
<entry field="guide_number" name="guideNumerEntry" width="20" x="53" y="9" style="label"/> |
<entry field="alien_document.guide_number" name="guideNumerEntry" width="20" x="53" y="9" style="label"/> |
1329 |
|
|
1330 |
<label name="bundlesLbl" text="Bultos" x="74" y="8" /> |
<label name="bundlesLbl" text="Bultos" x="74" y="8" /> |
1331 |
<entry field="bundles" name="bundlesEntry" width="10" x="74" y="9" style="label"/> |
<entry field="alien_document.bundles" name="bundlesEntry" width="10" x="74" y="9" style="label"/> |
1332 |
|
|
1333 |
</block> |
</block> |
1334 |
</box> |
</box> |
1390 |
</block> |
</block> |
1391 |
<block datasource="alienDocumentShowDataSource" name="totalShowBlock"> |
<block datasource="alienDocumentShowDataSource" name="totalShowBlock"> |
1392 |
<label name="totalLbl" text="Neto" x="55" y="21"/> |
<label name="totalLbl" text="Neto" x="55" y="21"/> |
1393 |
<entry name="netoEntry" field="net_total" readonly="" style="label" x="55" y="22" width="12" default="0.00"/> |
<entry name="netoEntry" field="alien_document.net_total" readonly="" style="label" x="55" y="22" width="12" default="0.00"/> |
1394 |
<label name="ivaLbl" text="IVA" x="65" y="21"/> |
<label name="ivaLbl" text="IVA" x="65" y="21"/> |
1395 |
<entry name="ivaEntry" field="tax_total" readonly="" style="label" x="65" y="22" width="12" default="0.00"/> |
<entry name="ivaEntry" field="alien_document.tax_total" readonly="" style="label" x="65" y="22" width="12" default="0.00"/> |
1396 |
<label name="totalLbl" text="Total" x="82" y="21"/> |
<label name="totalLbl" text="Total" x="82" y="21"/> |
1397 |
<entry name="totalEntry" readonly="" style="label" x="82" y="22" width="12" default="0.00"/> |
<entry name="totalEntry" readonly="" style="label" x="82" y="22" width="12" default="0.00"/> |
1398 |
</block> |
</block> |