Just tried out the module, and Schema was complaining about the 'vat' field in
two of the tables, you may want to check that out. Schema also was throwing
errors of its own when trying to generate the warnings related to this module.

I got this error in Firebug when clicking the jquery 'add item' element to
the invoices, it was broken

<em class="placeholder">PDOException</em>: SQLSTATE[01000]: Warning: 1265 Data truncated for column &#039;vat&#039; at row 1: INSERT INTO {invoice_items} (description, vat, quantity, unitcost, invoice_id, uid, created) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array
(
    [:db_insert_placeholder_0] =&gt; 
    [:db_insert_placeholder_1] =&gt; 
    [:db_insert_placeholder_2] =&gt; 1
    [:db_insert_placeholder_3] =&gt; 919.54
    [:db_insert_placeholder_4] =&gt; 0
    [:db_insert_placeholder_5] =&gt; 1
    [:db_insert_placeholder_6] =&gt; 1326765845
)
 in <em class="placeholder">invoice_save_item()</em> (line <em class="placeholder">199</em> of <em class="placeholder">path/site/modules/contrib/invoice/invoice_ajax.inc</em>).

for the js file, I eliminated the document ready and wrapped everything like this
which as I understand it, is the proper implementation for D7

(function($) {
  
Drupal.behaviors.invoice = {
 attach: function(context, settings) {

     var invoice = null;

...

...

       invoice.init();
  }
};
})(jQuery);

and it works now.

Comments

pietervogelaar’s picture

Which version did you use? The ticket says 7.x-1.0-beta2. If that's the case please update to 7.x-1.0.

Pieter

blasthaus’s picture

Version: 7.x-1.0-beta2 » 7.x-1.0
pietervogelaar’s picture

Do you have the VAT field displayed when adding an invoice item? It seems that an empty string is inserted into an integer field.

pietervogelaar’s picture

Status: Active » Closed (cannot reproduce)