[%- LxERP.t8('Existing profiles') %]:
- [% L.select_tag('profile.id', L.options_for_select(SELF.all_profiles, title => 'name', default => SELF.profile.id), style => 'width: 300px') %]
+ [% L.select_tag('profile.id', SELF.all_profiles, title_key = 'name', default = SELF.profile.id, style = 'width: 300px') %]
[% L.submit_tag('action_new', LxERP.t8('Load profile')) %]
@@ -70,6 +73,7 @@
[%- IF SELF.type == 'contacts' %]
+ [%- LxERP.t8("You can update existing contacts by providing the 'cp_id' column with their database IDs. Otherwise: ") %]
[%- LxERP.t8('At least one of the columns #1, customer, customernumber, vendor, vendornumber (depending on the target table) is required for matching the entry to an existing customer or vendor.', 'cp_cv_id') %]
@@ -83,6 +87,14 @@
[%- LxERP.t8("If the article type is set to 'mixed' then a column called 'type' must be present.") %]
[% LxERP.t8("Type can be either 'part' or 'service'.") %]
+
+
+ [1]:
+ [% LxERP.t8('The three columns "make_X", "model_X" and "lastcost_X" with the same number "X" are used to import vendor part numbers and vendor prices.') %]
+ [% LxERP.t8('The column triplets can occur multiple times with different numbers "X" each time (e.g. "make_1", "model_1", "lastcost_1", "make_2", "model_2", "lastcost_2", "make_3", "model_3", "lastcost_3" etc).') %]
+ [% LxERP.t8('The items are imported accoring do their number "X" regardless of the column order inside the file.') %]
+ [% LxERP.t8('The column "make_X" can contain either a vendor\'s database ID, a vendor number or a vendor\'s name.') %]
+
[%- END %]
@@ -95,18 +107,24 @@
[%- LxERP.t8('Settings') %]
+
+
+
+
[% LxERP.t8("Hide settings") %]
+
[%- LxERP.t8('Number Format') %]:
- [% SET options = L.options_for_select([ '1.000,00', '1000,00', '1,000.00', '1000.00' ], default => SELF.profile.get('numberformat')) %]
- [% L.select_tag('settings.numberformat', options, style => 'width: 300px') %]
+ [% L.select_tag('settings.numberformat', ['1.000,00', '1000,00', '1,000.00', '1000.00'], default = SELF.profile.get('numberformat'), style = 'width: 300px') %]
[%- LxERP.t8('Charset') %]:
- [% L.select_tag('settings.charset', L.options_for_select(SELF.all_charsets, default => SELF.profile.get('charset')), style => 'width: 300px') %]
+ [% L.select_tag('settings.charset', SELF.all_charsets, default = SELF.profile.get('charset'), style = 'width: 300px') %]
@@ -157,20 +175,37 @@
-
- [%- LxERP.t8('Check for duplicates') %]:
-
- [% opts = [ [ 'no_check', LxERP.t8('Do not check for duplicates') ],
- [ 'check_csv', LxERP.t8('Discard duplicate entries in CSV file') ],
- [ 'check_db', LxERP.t8('Discard entries with duplicates in database or CSV file') ] ] %]
- [% L.select_tag('settings.duplicates', L.options_for_select(opts, default => SELF.profile.get('duplicates')), style => 'width: 300px') %]
-
-
+ [% duplicate_fields = SELF.worker.get_duplicate_check_fields() %]
+ [% IF ( duplicate_fields.size ) %]
+
+ [%- LxERP.t8('Check for duplicates') %]:
+
+
+ [% FOREACH key = duplicate_fields.keys %]
+
+ [% duplicate_fields.$key.label | html %]
+ [% END %]
+
+
+
+
+
+
+
+ [% opts = [ [ 'no_check', LxERP.t8('Do not check for duplicates') ],
+ [ 'check_csv', LxERP.t8('Discard duplicate entries in CSV file') ],
+ [ 'check_db', LxERP.t8('Discard entries with duplicates in database or CSV file') ] ] %]
+ [% L.select_tag('settings.duplicates', opts, default = SELF.profile.get('duplicates'), style = 'width: 300px') %]
+
+
+ [% END %]
[%- IF SELF.type == 'parts' %]
[%- INCLUDE 'csv_import/_form_parts.html' %]
[%- ELSIF SELF.type == 'customers_vendors' %]
[%- INCLUDE 'csv_import/_form_customers_vendors.html' %]
+[%- ELSIF SELF.type == 'contacts' %]
+ [%- INCLUDE 'csv_import/_form_contacts.html' %]
[%- END %]
@@ -196,27 +231,28 @@
+
+
+
[% L.submit_tag('action_test', LxERP.t8('Test and preview')) %]
- [% IF (SELF.import_status == 'tested') && SELF.num_importable %]
- [% L.submit_tag('action_import', LxERP.t8('Import')) %]
- [%- END %]
+ [% L.submit_tag('action_import', LxERP.t8('Import'), style='display:none') %]
- [%- IF SELF.import_status %]
- [%- IF SELF.errors %]
- [%- PROCESS 'csv_import/_errors.html' %]
- [%- END %]
-
- [%- PROCESS 'csv_import/_result.html' %]
- [%- PROCESS 'csv_import/_preview.html' %]
+
+ [%- IF SELF.deferred %]
+ [%- PROCESS 'csv_import/_deferred_results.html' %]
+ [%- ELSIF SELF.import_status %]
+ [%- PROCESS 'csv_import/_results.html' %]
[%- END %]
+
+
-
-