X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fcsv_import%2Fform.html;h=c3cbcac2e70ffe888bf6061b18a50de5b11b539e;hb=105428c561bd5c569953dca0104fcaf3ce4bc174;hp=745ef161c7f09238e7a16f3c62d1d0f973f47c11;hpb=15f58ff3dfd79651a95535b53f864ea0e8cb6620;p=kivitendo-erp.git diff --git a/templates/webpages/csv_import/form.html b/templates/webpages/csv_import/form.html index 745ef161c..c3cbcac2e 100644 --- a/templates/webpages/csv_import/form.html +++ b/templates/webpages/csv_import/form.html @@ -11,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') %]

@@ -125,9 +129,10 @@

[3]: - [% LxERP.t8("If the article type is set to 'mixed' then a column called 'type' must be present.") %] + [% 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("Assemblies can not be imported (yet). But the type column is used for sanity checks on price updates in order to prevent that articles with the wrong type will be updated.") %] + [%- 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 == 'inventories' %] @@ -135,7 +140,7 @@ [%- 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' %] +[%- ELSIF SELF.type == 'orders' OR SELF.type == 'ar_transactions' %]

[1]: [% 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.') %] @@ -168,7 +173,7 @@

@@ -260,8 +265,8 @@ [%- INCLUDE 'csv_import/_form_inventories.html' %] [%- ELSIF SELF.type == 'orders' %] [%- INCLUDE 'csv_import/_form_orders.html' %] -[%- ELSIF SELF.type == 'mt940' %] - [%- INCLUDE 'csv_import/_form_mt940.html' %] +[%- ELSIF SELF.type == 'ar_transactions' %] + [%- INCLUDE 'csv_import/_form_artransactions.html' %] [%- ELSIF SELF.type == 'bank_transactions' %] [%- INCLUDE 'csv_import/_form_banktransactions.html' %] [%- END %] @@ -292,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') %] @@ -300,8 +338,6 @@
[%- IF SELF.deferred %] [%- PROCESS 'csv_import/_deferred_results.html' %] - [%- ELSIF SELF.import_status %] - [%- PROCESS 'csv_import/_results.html' %] [%- END %]
@@ -314,7 +350,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() }); }); -->