{#zpl($text) = $text:replace('_', '_5F'):replace('^', '_5E'):replace('~', '_7E')}{d.pallets[i]}^XA ^CI28 ^PW1829^LL2438 ^FO84,48^A0N,84,84^FH^FD{$zpl(d.supplier.name)}^FS ^FO84,148^A0N,44,44^FH^FD{$zpl(d.supplier.street)}^FS ^FO84,200^A0N,44,44^FH^FD{d.supplier.zip} {$zpl(d.supplier.city)}, {$zpl(d.supplier.country)}^FS ^FO84,272^A0N,56,56^FH^FD{$zpl(d.pallets[i].description)}^FS ^FO0,356^GB1829,5,5^FS ^FO84,380^A0N,36,36^FDSSCC^FS ^FO84,426^A0N,92,92^FD{d.pallets[i].sscc}^FS ^FO1040,380^A0N,36,36^FDCOUNT^FS ^FO1040,426^A0N,92,92^FD{d.pallets[i].count}^FS ^FO84,550^A0N,36,36^FDCONTENT^FS ^FO84,596^A0N,92,92^FD{d.pallets[i].gtin}^FS {d.pallets[i].netWeight:ifNEM:showBegin}^FO1040,550^A0N,36,36^FDNET WEIGHT (kg)^FS ^FO1040,596^A0N,92,92^FD{d.pallets[i].netWeight:formatN(2)}^FS {d.pallets[i].netWeight:showEnd}{d.pallets[i].bestBefore:ifNEM:showBegin}^FO84,720^A0N,36,36^FDBEST BEFORE (DD.MM.YY)^FS ^FO84,766^A0N,92,92^FD{d.pallets[i].bestBefore:formatD('DD.MM.YY')}^FS {d.pallets[i].bestBefore:showEnd}{d.pallets[i].batch:ifNEM:showBegin}^FO1040,720^A0N,36,36^FDBATCH/LOT^FS ^FO1040,766^A0N,92,92^FH^FD{$zpl(d.pallets[i].batch)}^FS {d.pallets[i].batch:showEnd}^FO0,884^GB1829,5,5^FS ^FO84,916^BY7^BCN,384,N,N,N,D^FD(02){d.pallets[i].gtin}{d.pallets[i].netWeight:ifNEM:showBegin}(3102){d.pallets[i].netWeight:mul(100):round(0):padl(6, '0')}{d.pallets[i].netWeight:showEnd}(37){d.pallets[i].count}^FS ^FO84,1318^A0N,50,50^FD(02){d.pallets[i].gtin}{d.pallets[i].netWeight:ifNEM:showBegin}(3102){d.pallets[i].netWeight:mul(100):round(0):padl(6, '0')}{d.pallets[i].netWeight:showEnd}(37){d.pallets[i].count}^FS {d.pallets[i].batch:ifNEM:or(.bestBefore):ifNEM:showBegin}^FO84,1408^BY7^BCN,384,N,N,N,D^FH^FD{d.pallets[i].bestBefore:ifNEM:showBegin}(15){d.pallets[i].bestBefore:formatD('YYMMDD')}{d.pallets[i].bestBefore:showEnd}{d.pallets[i].batch:ifNEM:showBegin}(10){$zpl(d.pallets[i].batch)}{d.pallets[i].batch:showEnd}^FS ^FO84,1810^A0N,50,50^FH^FD{d.pallets[i].bestBefore:ifNEM:showBegin}(15){d.pallets[i].bestBefore:formatD('YYMMDD')}{d.pallets[i].bestBefore:showEnd}{d.pallets[i].batch:ifNEM:showBegin}(10){$zpl(d.pallets[i].batch)}{d.pallets[i].batch:showEnd}^FS {d.pallets[i].batch:showEnd}^FO84,1900^BY7^BCN,384,N,N,N,D^FD(00){d.pallets[i].sscc}^FS ^FO84,2302^A0N,50,50^FD(00){d.pallets[i].sscc}^FS ^PQ2 ^XZ {d.pallets[i+1]}