firegento / firegento-pdf

Generates nicer and configurable PDF for invoices, creditmemos and shippings in Magento
100 stars 62 forks source link

Update Abstract.php #364

Closed michaelhettwer closed 6 years ago

michaelhettwer commented 6 years ago

Fix problem with duplicate header lines -> Mass Printing PDF SolutioN: Empty array after generating each header

Schrank commented 6 years ago

Thanks for your PR! May you please add a PDF/Screenshot or steps how to reproduce the problem? I don't understand what you want to fix :-)

michaelhettwer commented 6 years ago

Hey Fabian

after selecting more than one invoices and select print invoices the generated pdf files includes duplicate header lines.

Invoice-Nr, Customer Nr and Vat ID are included in the first pdf: 1 time in the second: 2 times in the third: 3 times

after empty the array the issue is fixed :-)

best

michael

sprankhub commented 6 years ago

Thanks.

_headerLines is an array. You set it to an empty string. It should probably be set to array().

michaelhettwer commented 6 years ago

Of course, it should be. Thanks ;-)

Schrank commented 6 years ago

Thanks, I'll fix that. But I prefer to reset the headerLines on loop start :-)

michaelhettwer commented 6 years ago

Yeah, of course. Array() and on Loop start. Sorry for quick dirt fixing ;-)

Schrank commented 6 years ago

Thanks for bringing it up! <3