Exactly.
...
in admin/includes/modules/system/pdfbill.php sollten die Zeilen
xtc_db_query("ALTER TABLE " . TABLE_ORDERS . " DROP `ibn_billnr`;");
xtc_db_query("ALTER TABLE " . TABLE_ORDERS . " DROP `ibn_billdate`;");
auskommentiert werden.
...
Das auszukommentieren war das erste was ich gemacht habe als ich das Modul mal benötigte.
An dem Modul gibt es allerdings ohnehin zig Ungereimtheiten und Flaws, wollte ich immer mal überarbeiten, kam nur noch nicht dazu.
U.A. ist die hard-codierte Vergabe von 99 für die
configuration_group schon Bullshit. Den Eintrag in die Tabelle
configuration_group sollte man ohne
configuration_group_id machen und die automatisch vergebene dann mittels
xtc_db_insert_id() holen.
Auch würde ich das Modul unabhängig vom
modified-eigenen System-Modul
invoice_number.php machen und, auch wegen des Auskommentierens des Löschens der Felder, die Felder in der Tabelle
orders erst nach Prüfung hinzufügen.
function install
() { //BOC add fields only if they do not exist, noRiddle $orders_fields_arr = array(); $orders_field_query = xtc_db_query
("SHOW COLUMNS FROM ".TABLE_ORDERS
." LIKE 'ibn_bill%'"); while($orders_fields = xtc_db_fetch_array
($orders_field_query)) { $orders_fields_arr[] = $orders_fields['Field']; } if(!in_array('ibn_billnr', $orders_fields_arr)) { xtc_db_query
("ALTER TABLE " . TABLE_ORDERS
. " ADD ibn_billnr VARCHAR(32);"); } if(!in_array('ibn_billdate', $orders_fields_arr)) { xtc_db_query
("ALTER TABLE " . TABLE_ORDERS
. " ADD `ibn_billdate` DATE NOT NULL;"); } //EOC add fields only if they do not exist, noRiddle Für das vorliegende Modul habe ich mir eine eigene
/admin/includes/modules/invoice_number/invoicepdf_number_functions.php gebaut und in der
/includes/functions/invoice_numer_action.php in der Funktion
set_next_ibillnr() das ergänzt:
//BOC update PDF_BILL_LASTNR also since it is done nowhere, noRiddle $ln_sql_data_array = array('configuration_value' => $data); xtc_db_perform
(TABLE_CONFIGURATION
, $ln_sql_data_array, 'update', "configuration_key = 'PDF_BILL_LASTNR'"); //EOC update PDF_BILL_LASTNR also since it is done nowhere, noRiddle Gruß,
noRiddle