Provides basic functions for the various wtr2 scripts
Return 1 if name and id are OK, else return 0 and add error message(s)
to $errors
Return 1 if it exists, else return 0 and add error message to $errors
Return 1 if quantities are OK, else return 0 and add error message to $errors
$data should hold the data extracted from the XML in this format:
{ invoice => { number => <data>, date => <data>, payment_status => <data>, po => <data> amount_no_tax => <data>, amount => <data>, tax => <data> }, seller => { identifier => <data>, name =><data>, tax_code => <data> }, address => { street => <data>, town => <data>, zip => <data>, country_code => <data>, po_box => <data> }, contact => { name => <data>, email => <data>, phone => <data> }, invoicerow => [ { row_id => <data>, sku => <data>, name => <data>, qty => <data>, qty_unit => <data>, unit_price => <data>, amount => <data>, amount_no_tax => <data>, tax => <data> }, { ... }, ] }
store_all will add the links between records in the various tables (the FOREIGN KEYs)
Michel Rodriguez <mirod@xmltwig.com>
This code is Copyright (c) 2003 Michel Rodriguez. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Comments can be sent to mirod@xmltwig.com
DBI, DBD::SQLite, Memoize
Ways to Rome 2 - Kourallinen Dollareita - http://www.xmltwig.com/article/ways_to_rome_2/