firegento / firegento-pdf

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

qty on invoice can not be first #339

Closed Schrank closed 7 years ago

Schrank commented 7 years ago

I'm trying to change the column order for invoice to be qty first, but it doesn'T work.

Before save: bildschirmfoto 2017-01-08 um 14 54 04

after save: bildschirmfoto 2017-01-08 um 14 54 13

sprankhub commented 7 years ago

This is due to a strange behaviour of scriptaculous' Sortable. There are certain criteria for IDs of the draggable items:

  1. Each item must have a unique id.
  2. The item id must contain an underscore (_)
  3. The item id cannot begin with an underscore or a hyphen

The IDs must match the regular expression /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/. See http://krues8dr.com/blog/2009/02/10/scriptaculous-sortable-create-onupdate-event-not-firing/.

I now changed the ID prefix from pdf-column to pdf_column and it seems to work fine.