Skip to content

Commit

Permalink
Merge github pull request #30
Browse files Browse the repository at this point in the history
  • Loading branch information
jekkos committed Feb 11, 2015
1 parent cd92f85 commit ade913f
Show file tree
Hide file tree
Showing 40 changed files with 261 additions and 176 deletions.
3 changes: 3 additions & 0 deletions application/controllers/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ function save()
'tax_included'=>$this->input->post('tax_included'),
'recv_invoice_format'=>$this->input->post('recv_invoice_format'),
'sales_invoice_format'=>$this->input->post('sales_invoice_format'),
'receiving_calculate_average_price'=>$this->input->post('receiving_calculate_average_price'),
'thousands_separator'=>$this->input->post('thousands_separator'),
'decimal_point'=>$this->input->post('decimal_point'),
'custom1_name'=>$this->input->post('custom1_name'),/**GARRISON ADDED 4/20/2013**/
'custom2_name'=>$this->input->post('custom2_name'),/**GARRISON ADDED 4/20/2013**/
'custom3_name'=>$this->input->post('custom3_name'),/**GARRISON ADDED 4/20/2013**/
Expand Down
65 changes: 34 additions & 31 deletions application/controllers/items.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,37 +590,40 @@ function do_excel_import()
$i=1;
while (($data = fgetcsv($handle)) !== FALSE)
{

$item_data = array(
'name' => $data[1],
'description' => $data[11],
'category' => $data[2],
'cost_price' => $data[4],
'unit_price' => $data[5],
'reorder_level' => $data[10],
'supplier_id' => $this->Supplier->exists($data[3]) ? $data[3] : null,
'allow_alt_description' => $data[12] != '' ? '1' : '0',
'is_serialized' => $data[13] != '' ? '1' : '0',
'custom1' => $data[14], /** GARRISON ADDED 5/6/2013 **/
'custom2' => $data[15], /** GARRISON ADDED 5/6/2013 **/
'custom3' => $data[16], /** GARRISON ADDED 5/6/2013 **/
'custom4' => $data[17], /** GARRISON ADDED 5/6/2013 **/
'custom5' => $data[18], /** GARRISON ADDED 5/6/2013 **/
'custom6' => $data[19], /** GARRISON ADDED 5/6/2013 **/
'custom7' => $data[20], /** GARRISON ADDED 5/6/2013 **/
'custom8' => $data[21], /** GARRISON ADDED 5/6/2013 **/
'custom9' => $data[22], /** GARRISON ADDED 5/6/2013 **/
'custom10' => $data[23] /** GARRISON ADDED 5/6/2013 **/
);
$item_number = $data[0];

if ($item_number != "")
{
$item_data['item_number'] = $item_number;
}
$validated = $this->item_number_check($item_number);

if($validated && $this->Item->save($item_data))
if (sizeof($data) >= 23) {
$item_data = array(
'name' => $data[1],
'description' => $data[11],
'category' => $data[2],
'cost_price' => $data[4],
'unit_price' => $data[5],
'reorder_level' => $data[10],
'supplier_id' => $this->Supplier->exists($data[3]) ? $data[3] : null,
'allow_alt_description' => $data[12] != '' ? '1' : '0',
'is_serialized' => $data[13] != '' ? '1' : '0',
'custom1' => $data[14], /** GARRISON ADDED 5/6/2013 **/
'custom2' => $data[15], /** GARRISON ADDED 5/6/2013 **/
'custom3' => $data[16], /** GARRISON ADDED 5/6/2013 **/
'custom4' => $data[17], /** GARRISON ADDED 5/6/2013 **/
'custom5' => $data[18], /** GARRISON ADDED 5/6/2013 **/
'custom6' => $data[19], /** GARRISON ADDED 5/6/2013 **/
'custom7' => $data[20], /** GARRISON ADDED 5/6/2013 **/
'custom8' => $data[21], /** GARRISON ADDED 5/6/2013 **/
'custom9' => $data[22], /** GARRISON ADDED 5/6/2013 **/
'custom10' => $data[23] /** GARRISON ADDED 5/6/2013 **/
);
$item_number = $data[0];
if ($item_number != "")
{
$item_data['item_number'] = $item_number;
}
$invalidated = $this->Item->item_number_exists($item_number);
}
else
{
$invalidated = true;
}
if(!$invalidated && $this->Item->save($item_data))
{
$items_taxes_data = null;
//tax 1
Expand Down
10 changes: 6 additions & 4 deletions application/helpers/currency_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ function to_currency($number)
{
$CI =& get_instance();
$currency_symbol = $CI->config->item('currency_symbol') ? $CI->config->item('currency_symbol') : '$';
$thousands_separator = $CI->config->item('thousands_separator') ? $CI->config->item('thousands_separator') : '';
$decimal_point = $CI->config->item('decimal_point') ? $CI->config->item('decimal_point') : '.';
if($number >= 0)
{
if($CI->config->item('currency_side') !== 'currency_side')
return $currency_symbol.number_format($number, 2, '.', '');
return $currency_symbol.number_format($number, 2, $decimal_point, $thousands_separator);
else
return number_format($number, 2, '.', '').$currency_symbol;
return number_format($number, 2, $decimal_point, $thousands_separator).$currency_symbol;
}
else
{
if($CI->config->item('currency_side') !== 'currency_side')
return '-'.$currency_symbol.number_format(abs($number), 2, '.', '');
return '-'.$currency_symbol.number_format(abs($number), 2, $decimal_point, $thousands_separator);
else
return '-'.number_format(abs($number), 2, '.', '').$currency_symbol;
return '-'.number_format(abs($number), 2, $decimal_point, $thousands_separator).$currency_symbol;
}
}
/** END MODIFIED **/
Expand Down
4 changes: 4 additions & 0 deletions application/language/en/config_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,9 @@
$lang["config_location_info"] = "Location Configuration Information";
$lang["config_logout"] = "Don't you want to make a backup before logging out? Click [OK] to backup, [Cancel] to logout";
$lang["config_backup_database"] = "Backup Database";
$lang["config_receiving_calculate_average_price"] = "Calc avg. Price (Receiving)";
$lang["config_number_format"] = "Number Format";
$lang["config_thousands_separator"] = "Thousands Separator";
$lang["config_decimal_point"] = "Decimal Point";
$lang["config_backup_button"] = "Backup";
$lang["config_stock_location_invalid_chars"] = "The stock location name can not contain '_'";
4 changes: 2 additions & 2 deletions application/language/en/sales_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
$lang["sales_giftcard"] = "Gift Card";
$lang["sales_giftcard_number"] = "Gift Card Number";
$lang["sales_id"] = "Sale ID";
$lang["sales_invoice_enable"] = "Create Invoice";
$lang["sales_invoice_number"] = "Invoice #";
$lang["sales_invoice_number_duplicate"] = "Please enter an unique invoice number";
$lang["sales_invoice_number_duplicate"] = "Please enter an unique invoice number";
$lang["sales_item_insufficient_of_stock"] = "Item is Insufficient of Stock";
$lang["sales_item_name"] = "Item Name";
$lang["sales_item_number"] = "Item #";
Expand Down Expand Up @@ -71,7 +71,7 @@
$lang["sales_select_customer"] = "Select Customer (Optional)";
$lang["sales_serial"] = "Serial";
$lang["sales_start_typing_customer_name"] = "Start Typing customer's name...";
$lang["sales_start_typing_item_name"] = "Start Typing item's name or scan barcode...";
$lang["sales_stock_location"] = "Stock location";
$lang["sales_stock_location"] = "Stock location";
$lang["sales_sub_total"] = "Sub Total";
$lang["sales_successfully_deleted"] = "You have successfully deleted";
Expand Down
4 changes: 4 additions & 0 deletions application/language/es/config_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,9 @@
$lang["config_location_info"] = "Location Configuration Information";
$lang["config_logout"] = "Don't you want to make a backup before logging out?";
$lang["config_backup_database"] = "Backup Database";
$lang["config_receiving_calculate_average_price"] = "Calc avg. Price (Receiving)";
$lang["config_number_format"] = "Number Format";
$lang["config_thousands_separator"] = " Thousands Separator";
$lang["config_decimal_point"] = " Decimal Point";
$lang["config_backup_button"] = "Backup";
$lang["config_stock_location_invalid_chars"] = "The stock location name can not contain '_'";
4 changes: 2 additions & 2 deletions application/language/es/sales_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
$lang["sales_giftcard"] = "Tarjeta de Regalo";
$lang["sales_giftcard_number"] = "Número de Tarjeta de Regalo";
$lang["sales_id"] = "ID de Venta";
$lang["sales_invoice_enable"] = "";
$lang["sales_invoice_number"] = "Invoice #";
$lang["sales_invoice_number_duplicate"] = "Please enter an unique invoice number";
$lang["sales_invoice_number_duplicate"] = "Please enter an unique invoice number";
$lang["sales_item_insufficient_of_stock"] = "Hay un número insuficiente de Artículos en existencia";
$lang["sales_item_name"] = "Nombre del Artículo";
$lang["sales_item_number"] = "UPC/EAN/ISBN";
Expand Down Expand Up @@ -71,7 +71,7 @@
$lang["sales_select_customer"] = "Seleccionar Cliente (Opcional)";
$lang["sales_serial"] = "Serial";
$lang["sales_start_typing_customer_name"] = "Empieza a escribir el cliente...";
$lang["sales_start_typing_item_name"] = "Empieza a escribir o escanea el código de barras...";
$lang["sales_stock_location"] = "";
$lang["sales_stock_location"] = "";
$lang["sales_sub_total"] = "Subtotal";
$lang["sales_successfully_deleted"] = "La Venta ha sido borrada satisfactoriamente";
Expand Down
4 changes: 4 additions & 0 deletions application/language/fr/config_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,9 @@
$lang["config_location_info"] = "Location Configuration Information";
$lang["config_logout"] = "Don't you want to make a backup before logging out?";
$lang["config_backup_database"] = "Backup Database";
$lang["config_receiving_calculate_average_price"] = "Calc avg. Price (Receiving)";
$lang["config_number_format"] = "Number Format";
$lang["config_thousands_separator"] = " Thousands Separator";
$lang["config_decimal_point"] = " Decimal Point";
$lang["config_backup_button"] = "Backup";
$lang["config_stock_location_invalid_chars"] = "The stock location name can not contain '_'";
4 changes: 2 additions & 2 deletions application/language/fr/sales_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
$lang["sales_giftcard"] = "Carte Cadeau";
$lang["sales_giftcard_number"] = "Numéro de Carte cadeau";
$lang["sales_id"] = "ID Vente";
$lang["sales_invoice_enable"] = "";
$lang["sales_invoice_number"] = "Invoice #";
$lang["sales_invoice_number_duplicate"] = "";
$lang["sales_invoice_number_duplicate"] = "";
$lang["sales_item_insufficient_of_stock"] = "Stock top faible";
$lang["sales_item_name"] = "Nom";
$lang["sales_item_number"] = "# Item";
Expand Down Expand Up @@ -71,7 +71,7 @@
$lang["sales_select_customer"] = "Choisir Client (Facultatif)";
$lang["sales_serial"] = "Serie";
$lang["sales_start_typing_customer_name"] = "Commencez à saisir le nom du client...";
$lang["sales_start_typing_item_name"] = "Commencez à saisir le nom de l\'item ou scannez le code-barre...";
$lang["sales_stock_location"] = "";
$lang["sales_stock_location"] = "";
$lang["sales_sub_total"] = "Sous-Total";
$lang["sales_successfully_deleted"] = "Vente supprimée";
Expand Down
4 changes: 2 additions & 2 deletions application/language/id/common_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$lang["common_fields_required_message"] = "Bagian yang ditandai warna merah wajib diisi";
$lang["common_first_name"] = "Nama Depan";
$lang["common_first_name_required"] = "Nama depan wajib diisi.";
$lang["common_inv"] = "Inv";
$lang["common_inv"] = "Persediaan";
$lang["common_last_name"] = "Nama Belakang";
$lang["common_last_name_required"] = "Nama belakang wajib diisi.";
$lang["common_learn_about_project"] = "Untuk belajar informasi terbaru tentang proyek ini";
Expand All @@ -24,7 +24,7 @@
$lang["common_no_persons_to_display"] = "Tidak ada orang untuk ditampilkan";
$lang["common_or"] = "ATAU";
$lang["common_phone_number"] = "Telepon";
$lang["common_phone_number_required"] = "";
$lang["common_phone_number_required"] = "Nomer Telepon Wajib Diisi";
$lang["common_please_visit_my"] = "Silahkan kunjungi";
$lang["common_powered_by"] = "Diberdayakan oleh";
$lang["common_price"] = "Harga";
Expand Down
10 changes: 7 additions & 3 deletions application/language/id/config_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@
$lang["config_phone"] = "Telepon Perusahaan";
$lang["config_phone_required"] = "Telepon Perusahaan wajib diisi";
$lang["config_print_after_sale"] = "Cetak Faktur setelah penjualan";
$lang["config_recv_invoice_format"] = "";
$lang["config_recv_invoice_format"] = "Format Nota";
$lang["config_return_policy_required"] = "Kebijakan retur wajib diisi";
$lang["config_sales_invoice_format"] = "";
$lang["config_sales_invoice_format"] = "Format Nota";
$lang["config_saved_successfully"] = "Konfigurasi berhasil disimpan";
$lang["config_saved_unsuccessfully"] = "Konfigurasi tidak berhasil disimpan";
$lang["config_stock_location"] = "Stock location";
$lang["config_stock_location"] = "Lokasi Stock";
$lang["config_stock_location_duplicate"] = "Please use an unique location name";
$lang["config_stock_location_required"] = "Stock location number is a required field";
$lang["config_tax_included"] = "Dikenakan Pajak";
Expand All @@ -84,5 +84,9 @@
$lang["config_location_info"] = "Location Configuration Information";
$lang["config_logout"] = "Don't you want to make a backup before logging out?";
$lang["config_backup_database"] = "Backup Database";
$lang["config_receiving_calculate_average_price"] = "Calc avg. Price (Receiving)";
$lang["config_number_format"] = "Format Nomor";
$lang["config_thousands_separator"] = "Pemisah Ribuan";
$lang["config_decimal_point"] = "Titik Desimal";
$lang["config_backup_button"] = "Backup";
$lang["config_stock_location_invalid_chars"] = "The stock location name can not contain '_'";
2 changes: 1 addition & 1 deletion application/language/id/giftcards_lang.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

$lang["giftcards_add_minus"] = "Penyesuaian Inventori TAMBAH / KURANG (-)";
$lang["giftcards_allow_alt_desciption"] = "";
$lang["giftcards_allow_alt_desciption"] = "Deskripsi Alternatif dimungkinkan";
$lang["giftcards_allow_alt_description"] = "Deskripsi Alternatif dimungkinkan";
$lang["giftcards_amazon"] = "Amazon";
$lang["giftcards_basic_information"] = "Informasi GiftCard";
Expand Down
4 changes: 2 additions & 2 deletions application/language/id/items_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
$lang["items_is_deleted"] = "Item dihapus";
$lang["items_is_serialized"] = "Item Memiliki Nomor Serial";
$lang["items_item"] = "Item";
$lang["items_item_number"] = "UPC/EAN/ISBN";
$lang["items_item_number"] = "Kode Barang";
$lang["items_number_required"] = "UPC/EAN/ISBN is a required field";
$lang["items_location"] = "Lokasi Barang";
$lang["items_low_inventory_items"] = "Item Inventori Rendah";
$lang["items_low_inventory_items"] = "Daftar Stock Rendah";
$lang["items_manually_editing_of_quantity"] = "Perubahan jumlah Stok secara manual";
$lang["items_must_select_item_for_barcode"] = "Anda harus memilih minimal 1 item untuk membuat barcode";
$lang["items_name"] = "Nama Barang";
Expand Down
46 changes: 23 additions & 23 deletions application/language/id/receivings_lang.php
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
<?php

$lang["receivings_transaction_failed"] = "Transaksi Penerimaan Salah";
$lang["recvs_basic_information"] = "";
$lang["recvs_cancel_receiving"] = "";
$lang["recvs_cannot_be_deleted"] = "";
$lang["recvs_comments"] = "";
$lang["recvs_basic_information"] = "Informasi Penerimaan Barang";
$lang["recvs_cancel_receiving"] = "Batal";
$lang["recvs_cannot_be_deleted"] = "Tidak bisa dihapus";
$lang["recvs_comments"] = "Keterangan";
$lang["recvs_complete_receiving"] = "Selesai";
$lang["recvs_confirm_cancel_receiving"] = "Apakah anda yakin untuk menghapus Penerimaan Barang masuk ini? Semua item Akan dihapus.";
$lang["recvs_confirm_finish_receiving"] = "Apakah anda yakin untuk memproses Penerimaan Barang masuk ini? Proses ini tidak dapat dibatalkan.";
$lang["recvs_cost"] = "Harga";
$lang["recvs_date"] = "";
$lang["recvs_date_required"] = "";
$lang["recvs_date_type"] = "";
$lang["recvs_delete_confirmation"] = "";
$lang["recvs_delete_entire_sale"] = "";
$lang["recvs_date"] = "Tanggal";
$lang["recvs_date_required"] = "Tanngalnya harus diisi";
$lang["recvs_date_type"] = "Model Tanggal";
$lang["recvs_delete_confirmation"] = "Konfirmasi Hapus";
$lang["recvs_delete_entire_sale"] = "Hapus Semua Penjualan";
$lang["recvs_discount"] = "Diskon %";
$lang["recvs_edit"] = "Ubah";
$lang["recvs_edit_sale"] = "";
$lang["recvs_employee"] = "";
$lang["recvs_edit_sale"] = "Ubah Penerimaan";
$lang["recvs_employee"] = "Karyawan";
$lang["recvs_error_editing_item"] = "Pengubahan Item Salah";
$lang["recvs_error_requisition"] = "";
$lang["recvs_error_requisition"] = "Kesalahan Daftar Permintaan";
$lang["recvs_find_or_scan_item"] = "Cari/Scan Item";
$lang["recvs_find_or_scan_item_or_receipt"] = "Cari/Scan Item ATAU Faktur";
$lang["recvs_id"] = "ID Penerimaan";
$lang["recvs_invoice_number"] = "";
$lang["recvs_invoice_number_duplicate"] = "";
$lang["recvs_invoice_number"] = "Nomer Nota";
$lang["recvs_invoice_number_duplicate"] = "Nomer Nota Double";
$lang["recvs_item_name"] = "Nama Item";
$lang["recvs_mode"] = "Jenis Penerimaan";
$lang["recvs_new_supplier"] = "Pemasok Baru";
$lang["recvs_one_or_multiple"] = "";
$lang["recvs_one_or_multiple"] = "Satu Atau Double";
$lang["recvs_quantity"] = "Jumlah";
$lang["recvs_receipt"] = "Faktur Penerimaan";
$lang["recvs_receipt_number"] = "";
$lang["recvs_receipt_number"] = "No. Faktur Penerimaan";
$lang["recvs_receiving"] = "Barang Masuk";
$lang["recvs_register"] = "Penerimaan Barang Masuk";
$lang["recvs_requisition"] = "";
$lang["recvs_requisition"] = "Mutasi Antar Gudang";
$lang["recvs_return"] = "Retur";
$lang["recvs_select_supplier"] = "Pilih Pemasok (Opsional)";
$lang["recvs_start_typing_supplier_name"] = "Ketik nama pemasok ...";
$lang["recvs_stock_destination"] = "";
$lang["recvs_stock_locaiton"] = "";
$lang["recvs_stock_source"] = "";
$lang["recvs_successfully_deleted"] = "";
$lang["recvs_successfully_updated"] = "";
$lang["recvs_stock_destination"] = "Tujuan Stok";
$lang["recvs_stock_locaiton"] = "Lokasi Stok";
$lang["recvs_stock_source"] = "Asal Stok";
$lang["recvs_successfully_deleted"] = "Berhasil Dihapus";
$lang["recvs_successfully_updated"] = "Berhasil Diperbaharui";
$lang["recvs_supplier"] = "Pemasok";
$lang["recvs_total"] = "Total";
$lang["recvs_unable_to_add_item"] = "Item tidak dapat ditambahkan ke penerimaan barang masuk";
$lang["recvs_unsuccessfully_updated"] = "";
$lang["recvs_unsuccessfully_updated"] = "Tidak Berhasil Diperbaharui";
$lang["recvs_invoice_enable"] = "";
Loading

0 comments on commit ade913f

Please sign in to comment.