X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/c6043e021963ec66ad8c6e201f6c479de8c16257..5067d7bd31514962af9730b33323b831d87164f8:/templates/webpages/csv_import/form.html diff --git a/templates/webpages/csv_import/form.html b/templates/webpages/csv_import/form.html index 3b46cf5f5..1ab545384 100644 --- a/templates/webpages/csv_import/form.html +++ b/templates/webpages/csv_import/form.html @@ -2,8 +2,7 @@ [%- USE LxERP %] [%- USE L %] [%- USE T8 %] - -
[% FORM.title %]
+

[% FORM.title %]

[%- INCLUDE 'common/flash.html' %] @@ -12,6 +11,10 @@ [% L.hidden_tag('action', 'CsvImport/dispatch') %] [% L.hidden_tag('profile.type', SELF.profile.type) %] + [%- IF SELF.profile.get('dont_edit_profile') %] + [% L.hidden_tag('force_profile', 1) %] + [% L.hidden_tag('profile.id', SELF.profile.id) %] + [%- ELSE %]

[%- LxERP.t8('Import profiles') %]

@@ -60,12 +63,13 @@ [%- IF SELF.worker.is_multiplexed %]
- [%- FOREACH ri = SELF.displayable_columns.keys %] - + [%- FOREACH p = SELF.worker.profile %] + [%- END %] - [%- FOREACH ri = SELF.displayable_columns.keys %] + [%- FOREACH p = SELF.worker.profile %] + [% SET ri = p.row_ident %]
[%- ri %][%- p.row_ident %]
@@ -112,11 +116,6 @@

[%- ELSIF SELF.type == 'parts' %] -

- [%- 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.') %] @@ -124,11 +123,27 @@ [% 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.') %]

+

+ [2]: + [% LxERP.t8('Onhand only sets the quantity in master data, not in inventory. This is only a legacy info field and will be overwritten as soon as a inventory transfer happens.') %] +

+

+ [3]: + [% LxERP.t8("If the article type is set to 'mixed' then a column called 'part_type' or called 'pclass' must be present.") %] + [% LxERP.t8("Type can be either 'part', 'service' or 'assembly'.") %] + [%- LxERP.t8("If column 'pclass' is present the article type is then irrelevant or used as default ") %] + [% LxERP.t8("The 'pclass' column has the same abbreviation like a part export. The first letter is for the type Part,Assembly or Service, the second(and third) for Part Classification") %] +

-[%- ELSIF SELF.type == 'orders' %] +[%- ELSIF SELF.type == 'inventories' %] +

+ [%- LxERP.t8('One of the columns "qty" or "target_qty" must be given. If "target_qty" is given, the quantity to transfer for each transfer will be calculate, so that the quantity for this part, warehouse and bin will result in the given "target_qty" after each transfer.') %] +

+ +[%- ELSIF SELF.type == 'orders' OR SELF.type == 'ar_transactions' %]

[1]: - [% LxERP.t8('The column "datatype" must be present and must be the first column. The values must be the row names (see settings) for order and item data respectively.') %] + [% LxERP.t8('The column "datatype" must be present and must be at the same position / column in each data set. The values must be the row names (see settings) for order and item data respectively.') %]

[2]: @@ -158,7 +173,7 @@

@@ -246,8 +261,14 @@ [%- INCLUDE 'csv_import/_form_customers_vendors.html' %] [%- ELSIF SELF.type == 'contacts' %] [%- INCLUDE 'csv_import/_form_contacts.html' %] +[%- ELSIF SELF.type == 'inventories' %] + [%- INCLUDE 'csv_import/_form_inventories.html' %] [%- ELSIF SELF.type == 'orders' %] [%- INCLUDE 'csv_import/_form_orders.html' %] +[%- ELSIF SELF.type == 'ar_transactions' %] + [%- INCLUDE 'csv_import/_form_artransactions.html' %] +[%- ELSIF SELF.type == 'bank_transactions' %] + [%- INCLUDE 'csv_import/_form_banktransactions.html' %] [%- END %] @@ -276,7 +297,40 @@
+[%- UNLESS SELF.worker.is_multiplexed %] +

[% 'Mappings (csv_import)' | $T8 %]

+ + +
[%- LxERP.t8('Number Format') %]: - [% L.select_tag('settings.numberformat', ['1.000,00', '1000,00', '1,000.00', '1000.00'], default = SELF.profile.get('numberformat'), style = 'width: 300px') %] + [% L.select_tag('settings.numberformat', ['1.000,00', '1000,00', '1,000.00', '1000.00', "1'000.00"], default = SELF.profile.get('numberformat'), style = 'width: 300px') %]
+ + + + + + + + +[%- FOREACH row = SELF.mappings %] + [% PROCESS 'csv_import/_mapping_item.html', item=row IF row.from %] +[%- END %] + [% PROCESS 'csv_import/_mapping_item.html', item={} %] +
[% 'Text in CSV File' | $T8 %][% 'Known Column' | $T8 %]
+ + + + + +
+[%- END %] [% L.submit_tag('action_test', LxERP.t8('Test and preview')) %] +[%- END %] [% L.submit_tag('action_import', LxERP.t8('Import'), style='display:none') %] @@ -298,7 +352,14 @@ return true; alert('[% LxERP.t8('Please enter a profile name.') %]'); return false; - }) + }); + $('#add_empty_mapping_line').click(function(){ + $.get('controller.pl', { action: 'CsvImport/add_empty_mapping_line', 'profile.type': $('#profile_type').val() }, kivi.eval_json_result); + }); + $('#add_mapping_from_upload').click(function(){ + $.get('controller.pl?action_add_mapping_from_upload=1', $('form').serialize() , kivi.eval_json_result); + }); + $('#csv_import_mappings').on('click', '.remove_line', function(){ $(this).closest('tr').remove(); if (1==$('#csv_import_mappings tr:visible').length) $('#mapping_empty').show() }); }); -->