Revision a4d74009
Von Niclas Zimmermann vor mehr als 11 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
91 | 91 |
qq|JOIN $vc ct ON (o.${vc}_id = ct.id) | . |
92 | 92 |
qq|LEFT JOIN employee e ON (o.employee_id = e.id) | . |
93 | 93 |
qq|LEFT JOIN employee s ON (o.salesman_id = s.id) | . |
94 |
qq|LEFT JOIN exchangerate ex ON (ex.curr = o.curr | .
|
|
94 |
qq|LEFT JOIN exchangerate ex ON (ex.currency_id = o.currency_id | .
|
|
95 | 95 |
qq| AND ex.transdate = o.transdate) | . |
96 | 96 |
qq|LEFT JOIN project pr ON (o.globalproject_id = pr.id) | . |
97 | 97 |
qq|$periodic_invoices_joins | . |
... | ... | |
311 | 311 |
$query = qq|SELECT nextval('id')|; |
312 | 312 |
($form->{id}) = selectrow_query($form, $dbh, $query); |
313 | 313 |
|
314 |
$query = qq|INSERT INTO oe (id, ordnumber, employee_id, curr) VALUES (?, '', ?, (SELECT curr FROM defaults))|;
|
|
314 |
$query = qq|INSERT INTO oe (id, ordnumber, employee_id, currency_id) VALUES (?, '', ?, (SELECT currency_id FROM defaults))|;
|
|
315 | 315 |
do_query($form, $dbh, $query, $form->{id}, $form->{employee_id}); |
316 | 316 |
} |
317 | 317 |
|
... | ... | |
494 | 494 |
qq|UPDATE oe SET |
495 | 495 |
ordnumber = ?, quonumber = ?, cusordnumber = ?, transdate = ?, vendor_id = ?, |
496 | 496 |
customer_id = ?, amount = ?, netamount = ?, reqdate = ?, taxincluded = ?, |
497 |
shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, curr = (SELECT id FROM currencies WHERE curr=?), closed = ?,
|
|
497 |
shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, currency_id = (SELECT id FROM currencies WHERE name=?), closed = ?,
|
|
498 | 498 |
delivered = ?, proforma = ?, quotation = ?, department_id = ?, language_id = ?, |
499 | 499 |
taxzone_id = ?, shipto_id = ?, payment_id = ?, delivery_vendor_id = ?, delivery_customer_id = ?, |
500 | 500 |
globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?, marge_total = ?, marge_percent = ? |
... | ... | |
784 | 784 |
$query = |
785 | 785 |
qq|SELECT o.cp_id, o.ordnumber, o.transdate, o.reqdate, |
786 | 786 |
o.taxincluded, o.shippingpoint, o.shipvia, o.notes, o.intnotes, |
787 |
(SELECT cu.curr FROM currencies cu WHERE cu.id=o.curr) AS currency, e.name AS employee, o.employee_id, o.salesman_id,
|
|
787 |
(SELECT cu.name FROM currencies cu WHERE cu.id=o.currency_id) AS currency, e.name AS employee, o.employee_id, o.salesman_id,
|
|
788 | 788 |
o.${vc}_id, cv.name AS ${vc}, o.amount AS invtotal, |
789 | 789 |
o.closed, o.reqdate, o.quonumber, o.department_id, o.cusordnumber, |
790 | 790 |
d.description AS department, o.payment_id, o.language_id, o.taxzone_id, |
Auch abrufbar als: Unified diff
Verbesserungen in Upgrade-Scripten
In den Scripten currencies.pl rm_whitespaces wurden einige Ver-
besserungen durchgeführt:
1. Umbenennung von Spalten curr in currency_id in allen Tabellen
außer currencies.
2. Umbenennung von Spalte curr in name in Tabelle currencies.
3. Update in rm_whitespaces wird jetzt in einer Schleife erledigt
anstatt für jede Tabelle eigenen Code zu schreiben.
4. Tabelle currencies hat jetzt id als Primärschlüssel und nicht
mehr curr.
Die oben aufgeführten Änderungen führen natürlich auch zu notwendigen
Änderungen im Programm, welche dieses Commit ebenfalls enthält.