diff --git a/application/controllers/Customers.php b/application/controllers/Customers.php index c7ac10d82..473325e6d 100644 --- a/application/controllers/Customers.php +++ b/application/controllers/Customers.php @@ -142,6 +142,7 @@ class Customers extends Person_controller { $msg = $this->lang->line('items_excel_import_failed'); echo json_encode( array('success'=>false,'message'=>$msg) ); + return; } else @@ -155,22 +156,22 @@ class Customers extends Person_controller while (($data = fgetcsv($handle)) !== FALSE) { $person_data = array( - 'first_name'=>$data[0], - 'last_name'=>$data[1], - 'gender'=>$data[2], - 'email'=>$data[3], - 'phone_number'=>$data[4], - 'address_1'=>$data[5], - 'address_2'=>$data[6], - 'city'=>$data[7], - 'state'=>$data[8], - 'zip'=>$data[9], - 'country'=>$data[10], - 'comments'=>$data[11] + 'first_name'=>$data[0], + 'last_name'=>$data[1], + 'gender'=>$data[2], + 'email'=>$data[3], + 'phone_number'=>$data[4], + 'address_1'=>$data[5], + 'address_2'=>$data[6], + 'city'=>$data[7], + 'state'=>$data[8], + 'zip'=>$data[9], + 'country'=>$data[10], + 'comments'=>$data[11] ); $customer_data=array( - 'taxable'=>$data[13]=='' ? 0:1 + 'taxable'=>$data[13]=='' ? 0:1 ); $account_number = $data[12]; @@ -191,7 +192,8 @@ class Customers extends Person_controller } else { - echo json_encode( array('success'=>false,'message'=>'Your upload file has no data or not in supported format.') ); + echo json_encode( array('success'=>false, 'message'=>'Your upload file has no data or not in supported format.') ); + return; } } @@ -207,8 +209,7 @@ class Customers extends Person_controller $msg = "Import Customers successful"; } - echo json_encode( array('success'=>$success,'message'=>$msg) ); + echo json_encode( array('success'=>$success, 'message'=>$msg) ); } - } ?> \ No newline at end of file diff --git a/application/controllers/Items.php b/application/controllers/Items.php index b4a00bbc3..199cb0def 100644 --- a/application/controllers/Items.php +++ b/application/controllers/Items.php @@ -757,8 +757,9 @@ class Items extends Secure_area implements iData_controller { $failCodes[] = $i; } + + $i++; } - $i++; } else { @@ -781,6 +782,5 @@ class Items extends Secure_area implements iData_controller echo json_encode( array('success'=>$success, 'message'=>$msg) ); } - } ?> diff --git a/application/language/de-CH/common_lang.php b/application/language/de-CH/common_lang.php index a13b5adb3..6f5022861 100644 --- a/application/language/de-CH/common_lang.php +++ b/application/language/de-CH/common_lang.php @@ -51,9 +51,11 @@ $lang["common_you_are_using_ospos"] = "Sie verwenden Open Source Point Of Sales $lang["common_zip"] = "PLZ"; $lang["common_import"] = "Import"; $lang["common_download_import_template"] = "Download Import Excel Voralge (CSV)"; -$lang["common_import_file_path"] = "Dateipfad"; $lang["common_import_excel"] = "Excel Import"; $lang["common_import_full_path"] = "Voller Dateipfad zum Excel File notwendig"; +$lang["common_import_select_file"] = ""; +$lang["common_import_change_file"] = ""; +$lang["common_import_remove_file"] = ""; $lang["common_required"] = "Erforderlich"; $lang["common_days_sunday"] = "Sonntag"; $lang["common_days_monday"] = "Montag"; diff --git a/application/language/en/common_lang.php b/application/language/en/common_lang.php index 79df3b450..1086cdb5f 100644 --- a/application/language/en/common_lang.php +++ b/application/language/en/common_lang.php @@ -51,9 +51,11 @@ $lang["common_you_are_using_ospos"] = "You are using Open Source Point Of Sale V $lang["common_zip"] = "Zip"; $lang["common_import"] = "Import"; $lang["common_download_import_template"] = "Download Import Excel Template (CSV)"; -$lang["common_import_file_path"] = "file path"; $lang["common_import_excel"] = "Excel Import"; $lang["common_import_full_path"] = "Full path to excel file required"; +$lang["common_import_select_file"] = "Select file"; +$lang["common_import_change_file"] = "Change"; +$lang["common_import_remove_file"] = "Remove"; $lang["common_required"] = "Required"; $lang["common_days_sunday"] = "Sunday"; $lang["common_days_monday"] = "Monday"; diff --git a/application/language/es/common_lang.php b/application/language/es/common_lang.php index 50025021d..565ddc12d 100644 --- a/application/language/es/common_lang.php +++ b/application/language/es/common_lang.php @@ -51,9 +51,11 @@ $lang["common_you_are_using_ospos"] = "Estás usando Open Source Point Of Sale V $lang["common_zip"] = "Código Postal"; $lang["common_import"] = "Importar"; $lang["common_download_import_template"] = "Descargar Plantilla de Importación de Excel (CSV)"; -$lang["common_import_file_path"] = "Ruta del archivo"; $lang["common_import_excel"] = "Importar Excel"; $lang["common_import_full_path"] = "Requerida la ruta completa del archivo"; +$lang["common_import_select_file"] = ""; +$lang["common_import_change_file"] = ""; +$lang["common_import_remove_file"] = ""; $lang["common_required"] = "Requerido"; $lang["common_days_sunday"] = "Domingo"; $lang["common_days_monday"] = "Lunes"; diff --git a/application/language/fr/common_lang.php b/application/language/fr/common_lang.php index cf83ef857..4471688be 100644 --- a/application/language/fr/common_lang.php +++ b/application/language/fr/common_lang.php @@ -51,9 +51,11 @@ $lang["common_you_are_using_ospos"] = "Vous utilisez Open Source Point Of Sale V $lang["common_zip"] = "Zip"; $lang["common_import"] = "Import"; $lang["common_download_import_template"] = "Download Import Excel Template (CSV)"; -$lang["common_import_file_path"] = "file path"; $lang["common_import_excel"] = "Excel Import"; $lang["common_import_full_path"] = "Full path to excel file required"; +$lang["common_import_select_file"] = ""; +$lang["common_import_change_file"] = ""; +$lang["common_import_remove_file"] = ""; $lang["common_required"] = "Required"; $lang["common_days_sunday"] = "Dimanche"; $lang["common_days_monday"] = "Lundi"; diff --git a/application/language/id/common_lang.php b/application/language/id/common_lang.php index 01a6cf74d..9dd343e6f 100644 --- a/application/language/id/common_lang.php +++ b/application/language/id/common_lang.php @@ -51,9 +51,11 @@ $lang["common_you_are_using_ospos"] = "Anda menggunakan Open Source Point Of Sal $lang["common_zip"] = "Kode POS"; $lang["common_import"] = "Import"; $lang["common_download_import_template"] = "Download Import Excel Template (CSV)"; -$lang["common_import_file_path"] = "file path"; $lang["common_import_excel"] = "Excel Import"; $lang["common_import_full_path"] = "Full path to excel file required"; +$lang["common_import_select_file"] = ""; +$lang["common_import_change_file"] = ""; +$lang["common_import_remove_file"] = ""; $lang["common_required"] = "Required"; $lang["common_days_sunday"] = ""; $lang["common_days_monday"] = ""; diff --git a/application/language/nl-BE/common_lang.php b/application/language/nl-BE/common_lang.php index 19a509e51..41921f5d5 100755 --- a/application/language/nl-BE/common_lang.php +++ b/application/language/nl-BE/common_lang.php @@ -51,9 +51,11 @@ $lang["common_you_are_using_ospos"] = "You are using Open Source Point Of Sale V $lang["common_zip"] = "Postcode"; $lang["common_import"] = "Import"; $lang["common_download_import_template"] = "Download Import Excel Template (CSV)"; -$lang["common_import_file_path"] = "file path"; $lang["common_import_excel"] = "Excel Import"; $lang["common_import_full_path"] = "Full path to excel file required"; +$lang["common_import_select_file"] = ""; +$lang["common_import_change_file"] = ""; +$lang["common_import_remove_file"] = ""; $lang["common_required"] = "Required"; $lang["common_days_sunday"] = "Zondag"; $lang["common_days_monday"] = "Maandag"; diff --git a/application/language/ru/common_lang.php b/application/language/ru/common_lang.php index b213ab924..abec81889 100644 --- a/application/language/ru/common_lang.php +++ b/application/language/ru/common_lang.php @@ -51,9 +51,11 @@ $lang["common_you_are_using_ospos"] = "Вы использоваете Open Sour $lang["common_zip"] = "Почтовый индекс"; $lang["common_import"] = "Import"; $lang["common_download_import_template"] = "Download Import Excel Template (CSV)"; -$lang["common_import_file_path"] = "file path"; $lang["common_import_excel"] = "Excel Import"; $lang["common_import_full_path"] = "Full path to excel file required"; +$lang["common_import_select_file"] = ""; +$lang["common_import_change_file"] = ""; +$lang["common_import_remove_file"] = ""; $lang["common_required"] = "Required"; $lang["common_days_sunday"] = ""; $lang["common_days_monday"] = ""; diff --git a/application/language/th/common_lang.php b/application/language/th/common_lang.php index ffa0ffff4..da52093b2 100644 --- a/application/language/th/common_lang.php +++ b/application/language/th/common_lang.php @@ -51,9 +51,11 @@ $lang["common_you_are_using_ospos"] = "คุณกำลังใช้ Opensou $lang["common_zip"] = "รหัสไปรษณีย์"; $lang["common_import"] = "นำเข้า"; $lang["common_download_import_template"] = "Download Import Excel Template (CSV)"; -$lang["common_import_file_path"] = "file path"; $lang["common_import_excel"] = "Excel Import"; $lang["common_import_full_path"] = "Full path to excel file required"; +$lang["common_import_select_file"] = ""; +$lang["common_import_change_file"] = ""; +$lang["common_import_remove_file"] = ""; $lang["common_required"] = "ต้องกรอก"; $lang["common_days_sunday"] = ""; $lang["common_days_monday"] = ""; diff --git a/application/language/tr/common_lang.php b/application/language/tr/common_lang.php index b9a2ebd7e..4930464a8 100644 --- a/application/language/tr/common_lang.php +++ b/application/language/tr/common_lang.php @@ -51,9 +51,11 @@ $lang["common_you_are_using_ospos"] = "Kullandığınız sürüm"; $lang["common_zip"] = "Şehir Kodu"; $lang["common_import"] = "Import"; $lang["common_download_import_template"] = "Download Import Excel Template (CSV)"; -$lang["common_import_file_path"] = "file path"; $lang["common_import_excel"] = "Excel Import"; $lang["common_import_full_path"] = "Full path to excel file required"; +$lang["common_import_select_file"] = ""; +$lang["common_import_change_file"] = ""; +$lang["common_import_remove_file"] = ""; $lang["common_required"] = "Required"; $lang["common_days_sunday"] = ""; $lang["common_days_monday"] = ""; diff --git a/application/language/zh/common_lang.php b/application/language/zh/common_lang.php index 0717398a7..94c5f3ad7 100755 --- a/application/language/zh/common_lang.php +++ b/application/language/zh/common_lang.php @@ -51,9 +51,11 @@ $lang["common_you_are_using_ospos"] = "您正在使用 Open Source Point of Sale $lang["common_zip"] = "郵遞區號"; $lang["common_import"] = "Import"; $lang["common_download_import_template"] = "Download Import Excel Template (CSV)"; -$lang["common_import_file_path"] = "file path"; $lang["common_import_excel"] = "Excel Import"; $lang["common_import_full_path"] = "Full path to excel file required"; +$lang["common_import_select_file"] = ""; +$lang["common_import_change_file"] = ""; +$lang["common_import_remove_file"] = ""; $lang["common_required"] = "Required"; $lang["common_days_sunday"] = ""; $lang["common_days_monday"] = ""; diff --git a/application/views/customers/excel_import.php b/application/views/customers/excel_import.php index 55c06c8e3..cd95101a1 100644 --- a/application/views/customers/excel_import.php +++ b/application/views/customers/excel_import.php @@ -5,18 +5,18 @@ 'item_form', 'class'=>'form-horizontal')); ?>