1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Working on CSV import

This commit is contained in:
Hillel Coren 2017-07-07 15:12:57 +03:00
parent 6e89fcd0cb
commit 167d005373
2 changed files with 14 additions and 2 deletions

View File

@ -534,7 +534,18 @@ class ImportService
// Lookup field translations
foreach ($columns as $key => $value) {
unset($columns[$key]);
$columns[$value] = trans("texts.{$value}");
$label = $value;
// disambiguate some of the labels
if ($entityType == ENTITY_INVOICE) {
if ($label == 'name') {
$label = 'client_name';
} elseif ($label == 'notes') {
$label = 'product_notes';
} elseif ($label == 'terms') {
$label = 'invoice_terms';
}
}
$columns[$value] = trans("texts.{$label}");
}
array_unshift($columns, ' ');

View File

@ -511,7 +511,7 @@ $LANG = array(
'partial_remaining' => ':partial of :balance',
'more_fields' => 'More Fields',
'less_fields' => 'Less Fields',
'client_name' => 'Client',
'client_name' => 'Client Name',
'pdf_settings' => 'PDF Settings',
'product_settings' => 'Product Settings',
'auto_wrap' => 'Auto Line Wrap',
@ -2298,6 +2298,7 @@ $LANG = array(
'next_credit_number' => 'The next credit number is :number.',
'padding_help' => 'The number of zero\'s to pad the number.',
'import_warning_invalid_date' => 'Warning: The date format appears to be invalid.',
'product_notes' => 'Product Notes',
);