Revision f97b0778
Von Sven Schöling vor etwa 14 Jahren hinzugefügt
SL/DB/Helpers/Mappings.pm | ||
---|---|---|
2 | 2 |
|
3 | 3 |
use strict; |
4 | 4 |
|
5 |
use Exporter qw(import); |
|
6 |
|
|
7 |
our @EXPORT_OK = qw(db); |
|
8 |
|
|
9 | 5 |
# these will not be managed as Rose::DB models, because they are not normalized |
10 | 6 |
# significant changes are needed to get them done. |
11 | 7 |
my @lxoffice_blacklist_permanent = qw( |
12 |
acc_trans audittrail customertax datev defaults department dpt_trans |
|
13 |
exchangerate finanzamt follow_up_access gifi inventory leads licenseinvoice |
|
14 |
makemodel partsgroup partstax prices record_links rmaitems status tax_zones |
|
15 |
todo_user_config translation translation_payment_terms units_language |
|
16 |
vendortax); |
|
8 |
); |
|
17 | 9 |
|
18 | 10 |
# these are not managed _yet_, but will hopefully at some point. |
19 | 11 |
# if you are confident that one of these works, remove it here. |
... | ... | |
26 | 18 |
# unlike rails we have no singular<->plural magic. |
27 | 19 |
# remeber: tables should be named as the plural of the model name. |
28 | 20 |
my %lxoffice_package_names = ( |
21 |
acc_trans => 'acc_transaction', |
|
22 |
audittrail => 'audit_trail', |
|
29 | 23 |
ar => 'invoice', |
30 | 24 |
ap => 'purchase_invoice', |
31 | 25 |
bank_accounts => 'bank_account', |
... | ... | |
34 | 28 |
custom_variable_configs => 'custom_variable_config', |
35 | 29 |
custom_variables => 'custom_variable', |
36 | 30 |
custom_variables_validity => 'custom_variable_validity', |
31 |
customertax => 'customer_tax', |
|
32 |
datev => 'datev', |
|
33 |
defaults => 'default', |
|
37 | 34 |
delivery_orders => 'delivery_order', |
38 | 35 |
delivery_order_items => 'delivery_order_item', |
36 |
department => 'department', |
|
37 |
dpt_trans => 'dpt_trans', |
|
39 | 38 |
drafts => 'draft', |
40 | 39 |
dunning => 'dunning', |
41 | 40 |
dunning_config => 'dunning_config', |
42 | 41 |
employee => 'employee', |
42 |
exchangerate => 'exchangerate', |
|
43 |
finanzamt => 'finanzamt', |
|
44 |
follow_up_access => 'follow_up_access', |
|
43 | 45 |
follow_up_links => 'follow_up_link', |
44 | 46 |
follow_ups => 'follow_up', |
45 | 47 |
generic_translations => 'generic_translation', |
48 |
gifi => 'gifi', |
|
46 | 49 |
gl => 'GLTransaction', |
47 | 50 |
history_erp => 'history', |
51 |
inventory => 'inventory', |
|
48 | 52 |
invoice => 'invoice_item', |
49 | 53 |
language => 'language', |
50 |
license => 'licemse', |
|
54 |
leads => 'lead', |
|
55 |
license => 'license', |
|
56 |
licenseinvoice => 'license_invoice', |
|
57 |
makemodel => 'make_model', |
|
51 | 58 |
notes => 'note', |
52 | 59 |
orderitems => 'order_item', |
53 | 60 |
oe => 'order', |
54 | 61 |
parts => 'part', |
62 |
partsgroup => 'parts_group', |
|
63 |
partstax => 'parts_tax', |
|
55 | 64 |
payment_terms => 'payment_term', |
65 |
prices => 'prices', |
|
56 | 66 |
price_factors => 'price_factor', |
57 | 67 |
pricegroup => 'pricegroup', |
58 | 68 |
printers => 'Printer', |
69 |
record_links => 'record_link', |
|
59 | 70 |
rma => 'RMA', |
71 |
rmaitems => 'RMA_item', |
|
60 | 72 |
sepa_export => 'sepa_export', |
61 | 73 |
sepa_export_items => 'sepa_export_item', |
62 | 74 |
schema_info => 'schema_info', |
75 |
status => 'status', |
|
63 | 76 |
tax => 'tax', |
64 |
taxkeys => 'taxkey', |
|
77 |
taxkeys => 'tax_key', |
|
78 |
tax_zones => 'tax_zone', |
|
79 |
todo_user_config => 'todo_user_config', |
|
80 |
translation => 'translation', |
|
81 |
translation_payment_terms => 'translation_payment_term', |
|
65 | 82 |
units => 'unit', |
83 |
units_language => 'units_language', |
|
84 |
vendortax => 'vendor_tax', |
|
66 | 85 |
); |
67 | 86 |
|
68 | 87 |
sub get_blacklist { |
Auch abrufbar als: Unified diff
RDBO Normalisierung Part 2
Alle Tables mit id Spalte versehen. Taxkey und Licemse naming gefixt.
Ausserdem eine Funktion db eingefügt, die in package main sitzt und die
passenden Datenbankmodels zurückgibt, siehe Helpers::Mappings