Revision 6b353ee1
Von Cem Aydin vor mehr als 3 Jahren hinzugefügt
SL/DB/MetaSetup/BankAccount.pm | ||
---|---|---|
__PACKAGE__->meta->columns(
|
||
account_number => { type => 'varchar', length => 100 },
|
||
bank => { type => 'text' },
|
||
bank_account_id => { type => 'varchar' },
|
||
bank_code => { type => 'varchar', length => 100 },
|
||
bic => { type => 'varchar', length => 100 },
|
||
chart_id => { type => 'integer', not_null => 1 },
|
||
... | ... | |
reconciliation_starting_balance => { type => 'numeric', precision => 15, scale => 5 },
|
||
reconciliation_starting_date => { type => 'date' },
|
||
sortkey => { type => 'integer', not_null => 1 },
|
||
use_for_qrbill => { type => 'boolean', default => 'false', not_null => 1 },
|
||
use_for_zugferd => { type => 'boolean', default => 'false', not_null => 1 },
|
||
);
|
||
|
sql/Pg-upgrade2/bank_account_informations_for_swiss_qrbill.sql | ||
---|---|---|
-- @tag: bank_account_information_for_swiss_qrbill
|
||
-- @description: Bankkonto Informationen für Swiss QR-Bill hinzufügen
|
||
-- @depends: release_3_5_6_1
|
||
ALTER TABLE bank_accounts ADD COLUMN use_for_qrbill BOOLEAN;
|
||
ALTER TABLE bank_accounts ADD COLUMN bank_account_id VARCHAR;
|
||
|
||
UPDATE bank_accounts SET use_for_qrbill = (
|
||
SELECT COUNT(*)
|
||
FROM bank_accounts
|
||
) = 1;
|
||
|
||
ALTER TABLE bank_accounts
|
||
ALTER COLUMN use_for_qrbill SET DEFAULT FALSE,
|
||
ALTER COLUMN use_for_qrbill SET NOT NULL;
|
Auch abrufbar als: Unified diff
Swiss QR-Bill: Datenbankupgrade BankAccount
- Felder bank_account_id und use_for_qrbill hinzugefügt