[% WRAPPER "ui-header.html" stylesheet="ledgersmb.css" include_stylesheet=["system/setup.css"] %] [% PROCESS elements.html %]

## [% text('Database Management Console') %]

[% text('Upgrade Info') %]
[% INCLUDE input element_data = { name = 'database' type = 'hidden' value = database }; INCLUDE input element_data = { name = 'slschema' type = 'hidden' value = slschema }; INCLUDE input element_data = { name = 'lsmbversion' type = 'hidden' value = lsmbversion } %]

[% text('LedgerSMB has introduced three new system wide default values which ' _ 'you will need to set as part of the upgrade process.') %]

[% text('In addition to these new defaults LedgerSMB 1.3 adds stricter ' _ 'checks on data validity in the database. Because of these stricter checks ' _ 'it''s no longer valid to leave companies without a country or customers ' _ 'without accounts receivable reference. The defaults you choose below will ' _ 'be used to add values where these are currently missing but required.') %]

[% INCLUDE select element_data = { options = default_country name = 'default_country' label = text('Default Country') #' class = 'country' } %]
[% IF default_ar.size > 1; %]

[% text('LedgerSMB supports multiple Accounts receivable (AR) accounts ' _ 'per company. One of those must be the system default. Please select ' _ 'your default below in case of multiple. If the list below is empty, ' _ 'your database is in an inconsistent state and needs to be fixed first.') %]

[% INCLUDE select element_data = { name = 'default_ar' label = text('Default AR') #' class = 'accno' options = default_ar } %]
[% ELSE; INCLUDE input element_data = { name = 'default_ar' type = 'hidden' value = default_ar }; END %] [% IF default_ap.size > 1; %]

[% text('LedgerSMB supports multiple Accounts payable (AP) accounts ' _ 'per company. One of those must be the system default. Please select ' _ 'your default below in case of multiple. If the list below is empty, ' _ 'your database is in an inconsistent state and needs to be fixed first.') %]

[% INCLUDE select element_data = { name = 'default_ap' label = text('Default AP') #' class = 'accno' options = default_ap } %]
[% ELSE; INCLUDE input element_data = { name = 'default_ap' type = 'hidden' value = default_ap }; END %]

[% text('Note that the process invoked by hitting the button below might ' _ 'take long to complete as it will run the upgrade process and will ' _ 'copy all data from the 1.2 tables into the 1.3 tables.') %]

[% INCLUDE button element_data = { text = text('Upgrade') name = '__action' value = upgrade_action type = 'submit' class = 'submit' } %]
[% END %]