-Contract name,Order number,Entry date,ISBN,Author,Title,Publication year,Publisher code,Collection title,Notes,Quantity,RRP,Delivery place,Billing place
-[% FOREACH r IN rows %]"[% r.contractname %]",[% r.ordernumber %],[% r.entrydate %],[% r.isbn %],"[% r.author %]","[% r.title %]",[% r.publicationyear %],"[% r.publishercode %]","[% r.collectiontitle %]","[% r.notes %]",[% r.quantity %],[% r.rrp %],"[% r.deliveryplace %]","[% r.billingplace %]"
-[% END %]
+[%- USE Koha -%]
+[%- SET delimiter = Koha.Preference( 'delimiter' ) || ',' -%]
+
+[%- INCLUDE csv_headers/acqui/basket.tt -%]
+[%- INCLUDE empty_line.inc -%]
+
+[%- FOREACH r IN rows -%]
+"[% r.contractname | html %]"[%- delimiter | html -%]
+[% r.ordernumber | html %][%- delimiter | html -%]
+[% r.entrydate | html %][%- delimiter | html -%]
+[% r.isbn | html %][%- delimiter | html -%]
+"[% r.author | html %]"[%- delimiter | html -%]
+"[% r.title | html %]"[%- delimiter | html -%]
+[% r.publicationyear | html %][%- delimiter | html -%]
+"[% r.publishercode | html %]"[%- delimiter | html -%]
+"[% r.collectiontitle | html %]"[%- delimiter | html -%]
+"[% r.notes | html %]"[%- delimiter | html -%]
+[% r.quantity | html %][%- delimiter | html -%]
+[% r.rrp | html %][%- delimiter | html -%]
+"[% r.deliveryplace | html %]"[%- delimiter | html -%]
+"[% r.billingplace | html %]"
+[%- INCLUDE empty_line.inc -%]
+[%- END -%]