Closed (cannot reproduce)
Project:
Invoice
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2012 at 18:39 UTC
Updated:
8 Feb 2013 at 14:17 UTC
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 'vat' 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] =>
[:db_insert_placeholder_1] =>
[:db_insert_placeholder_2] => 1
[:db_insert_placeholder_3] => 919.54
[:db_insert_placeholder_4] => 0
[:db_insert_placeholder_5] => 1
[:db_insert_placeholder_6] => 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
Comment #1
pietervogelaar commentedWhich 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
Comment #2
blasthaus commentedComment #3
pietervogelaar commentedDo you have the VAT field displayed when adding an invoice item? It seems that an empty string is inserted into an integer field.
Comment #4
pietervogelaar commented