Ticket Printing Configuration
Overview
Similar to Universe ticket formats, Multidev defines ticket formats by ticket type:
Needs picture of ticket type, look through docs
Stored Procedures
TICKET_EXPORT Procedure
CREATE PROCEDURE TICKET_EXPORT (
NDAYS INTEGER
) RETURNS (
PKPRICE1 NUMERIC(15, 2),
PRODUCTCODE VARCHAR(20),
PRODUCTID VARCHAR(8),
ATTR1010 VARCHAR(80),
ATTR1062 VARCHAR(80),
ATTR1063 VARCHAR(80),
ATTR1064 VARCHAR(80),
ATTR1065 VARCHAR(80),
ATTR1066 VARCHAR(80),
ATTR1067 VARCHAR(80)
) AS
BEGIN
/* Preprocess code */
execute procedure fill_PriceticketSync (:ndays);
/* Output */
for select
a.pkprice1,
b.productcode,
b.productid,
v1.valuestr attr1010,
v2.valuestr attr1062,
v3.valuestr attr1063,
v4.valuestr attr1064,
v5.valuestr attr1065,
v6.valuestr attr1066,
v7.valuestr attr1067
from pricing a
join inventorymaster b on b.productid=a.pricekey
join PriceticketSync c on c.productid=b.productid and c.recs>=1
left join invmast_eav_attr v1 on v1.productid=b.productid and v1.attr_lang='1' and v1.attr_id ='1010'
left join invmast_eav_attr v2 on v2.productid=b.productid and v2.attr_lang='1' and v2.attr_id ='1062'
left join invmast_eav_attr v3 on v3.productid=b.productid and v3.attr_lang='1' and v3.attr_id ='1063'
left join invmast_eav_attr v4 on v4.productid=b.productid and v4.attr_lang='1' and v4.attr_id ='1064'
left join invmast_eav_attr v5 on v5.productid=b.productid and v5.attr_lang='1' and v5.attr_id ='1065'
left join invmast_eav_attr v6 on v6.productid=b.productid and v6.attr_lang='1' and v6.attr_id ='1066'
left join invmast_eav_attr v7 on v7.productid=b.productid and v7.attr_lang='1' and v7.attr_id ='1067'
where 'today' between a.efdatestart and a.efdateends
and a.pricezoneid='00'
and a.dim1='------'
into :pkprice1,:productcode,:productid,:attr1010,:attr1062,:attr1063,
:attr1064,:attr1065,:attr1066,:attr1067
do begin
suspend;
end
END
FILL_PRICETICKETSYNC Procedure
CREATE PROCEDURE FILL_PRICETICKETSYNC (
LAST_N_DAYS INTEGER
) AS
declare variable productid varchar(8);
declare variable cnt integer;
BEGIN
/* Clear out the work table */
update PriceticketSync set recs=0;
/* Attributes */
for select productid
from inventorymaster a
join invmast_eav_attr v on v.productid=a.productid
and v.attr_lang='1'
and '1010,1062,1063,1064,1065,1066,1067' containing v.attr_id
and v.eds_>='today'- :last_n_days
into :productid
do BEGIN
select count(*) from PriceticketSync
where productid=:productid into :cnt;
if (cnt>0) then
update PriceticketSync set recs=recs+1
where productid=:productid;
else
insert into PriceticketSync (productid,recs)
values (:productid ,1);
end
/* Pricing Record */
for select pricekey
from pricing
where efdatestart>='today'- :last_n_days
into :productid
do BEGIN
select count(*) from PriceticketSync
where productid=:productid into :cnt;
if (cnt>0) then
update PriceticketSync set recs=recs+1
where productid=:productid;
else
insert into PriceticketSync (productid,recs)
values (:productid ,1);
end
END
note
These procedures handle the synchronization and export of price ticket data, including product attributes and pricing information.