From de711b82ddf260935a50d0fde75fcb3739d7525e Mon Sep 17 00:00:00 2001 From: jekkos Date: Tue, 3 May 2016 21:35:46 +0200 Subject: [PATCH 1/7] Fix item delete (#525) --- application/models/Item.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/application/models/Item.php b/application/models/Item.php index 887080690..18bec9cad 100644 --- a/application/models/Item.php +++ b/application/models/Item.php @@ -249,7 +249,7 @@ class Item extends CI_Model public function delete($item_id) { $this->db->where('item_id', $item_id); - + // set to 0 quantities $this->Item_quantity->reset_quantity($item_id); @@ -271,11 +271,9 @@ class Item extends CI_Model */ public function delete_list($item_ids) { - $this->db->where_in('item_id', $item_ids); - // set to 0 quantities $this->Item_quantity->reset_quantity_list($item_ids); - + $this->db->where_in('item_id', $item_ids); return $this->db->update('items', array('deleted'=>1)); } From 488af06663d49fe689e8e9603cde3fa3285aa90d Mon Sep 17 00:00:00 2001 From: jekkos Date: Tue, 3 May 2016 22:41:44 +0200 Subject: [PATCH 2/7] Fix delete in Item model (#507) --- application/models/Item.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/application/models/Item.php b/application/models/Item.php index 18bec9cad..7adaa036b 100644 --- a/application/models/Item.php +++ b/application/models/Item.php @@ -248,11 +248,9 @@ class Item extends CI_Model */ public function delete($item_id) { - $this->db->where('item_id', $item_id); - // set to 0 quantities $this->Item_quantity->reset_quantity($item_id); - + $this->db->where('item_id', $item_id); return $this->db->update('items', array('deleted'=>1)); } From f2072134744ff32dae07175b84d7978361777570 Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Thu, 5 May 2016 19:41:06 +0100 Subject: [PATCH 3/7] Updated COPYING (#472) --- COPYING | 1 + 1 file changed, 1 insertion(+) diff --git a/COPYING b/COPYING index 9502fc083..afe147953 100644 --- a/COPYING +++ b/COPYING @@ -9,6 +9,7 @@ Copyright (c) 2014-2016 jekkos Copyright (c) 2015-2016 FrancescoUK (aka daN4cat) Copyright (c) 2015 Aamir Shahzad (aka asakpke), RoshanTech.com Copyright (c) 2015 Toni Haryanto (aka yllumi) +Copyright (c) 2016 Ramkrishna Mondal (aka RamkrishnaMondal) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in From a02a0c2a0bbd43cda187c35c71447922a8cf8737 Mon Sep 17 00:00:00 2001 From: J Sivakumaran Date: Fri, 6 May 2016 09:35:34 -0700 Subject: [PATCH 4/7] Update UPGRADE.txt --- UPGRADE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE.txt b/UPGRADE.txt index 488a069ce..6723f907e 100644 --- a/UPGRADE.txt +++ b/UPGRADE.txt @@ -3,7 +3,7 @@ How to Upgrade 1. Backup all your current database and OSPOS code 2. Make sure you have a copy of application/config/config.php and application/config/database.php 3. Remove all directories -4. Install tne new OSPOS +4. Install the new OSPOS 5. Run the database upgrade scripts from database/ (check which ones you need according to the version you are upgrading from) 6. Take the saved old config.php and upgrade the new config.php with any additional changes you made in the old. Take time to understand if new config rules require some changes (e.g. encryption keys) From c80b3e1c61aaa1120f95f0c6f94648ae1618b4cc Mon Sep 17 00:00:00 2001 From: jekkos Date: Mon, 9 May 2016 20:15:23 +0200 Subject: [PATCH 5/7] Fix excel export in reports section (#539) Conflicts: application/views/reports/date_input_excel_export.php --- application/views/reports/date_input_excel_export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/reports/date_input_excel_export.php b/application/views/reports/date_input_excel_export.php index 18aa4d17a..bc3d6df00 100644 --- a/application/views/reports/date_input_excel_export.php +++ b/application/views/reports/date_input_excel_export.php @@ -60,7 +60,7 @@ $(document).ready(function() var sale_type = $("#sale_type").val(); var location = window.location + '/' + start_date + '/' + end_date + '/' + sale_type; - if ($("#export_excel_yes").attr('checked')) + if ($("input[name='export_excel']").is(':checked')) { location += '/' + 1; } From 3b4fbce6f67834493dfe8cbade25f4aab2cd78a1 Mon Sep 17 00:00:00 2001 From: jekkos Date: Tue, 10 May 2016 08:06:15 +0200 Subject: [PATCH 6/7] Get selected state for export using jQuery (#539) --- application/views/reports/date_input_excel_export.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/application/views/reports/date_input_excel_export.php b/application/views/reports/date_input_excel_export.php index bc3d6df00..3c2347a82 100644 --- a/application/views/reports/date_input_excel_export.php +++ b/application/views/reports/date_input_excel_export.php @@ -59,15 +59,7 @@ $(document).ready(function() { var sale_type = $("#sale_type").val(); var location = window.location + '/' + start_date + '/' + end_date + '/' + sale_type; - - if ($("input[name='export_excel']").is(':checked')) - { - location += '/' + 1; - } - else - { - location += '/' + 0; - } + location += '/' + $("input[name='export_excel']:checked").val(); window.location = location; }); From 498f8a06b8b7072cebac9cf6380b743da10df511 Mon Sep 17 00:00:00 2001 From: jekkos Date: Tue, 10 May 2016 18:36:20 +0200 Subject: [PATCH 7/7] Rework url generation for excel export (#539, #540) --- application/views/reports/date_input.php | 16 +--------------- .../views/reports/date_input_excel_export.php | 6 +----- application/views/reports/excel_export.php | 8 +------- .../views/reports/inventory_summary_input.php | 8 +------- application/views/reports/specific_input.php | 14 +------------- 5 files changed, 5 insertions(+), 47 deletions(-) diff --git a/application/views/reports/date_input.php b/application/views/reports/date_input.php index 8fede009a..3747a1ed9 100644 --- a/application/views/reports/date_input.php +++ b/application/views/reports/date_input.php @@ -78,21 +78,7 @@ $(document).ready(function() $("#generate_report").click(function() { - var input_type = $("#input_type").val(); - var location_id = $("#location_id").val(); - var location = window.location + '/' + start_date + '/' + end_date; - - if (input_type) - { - location += '/' + input_type; - } - - if (location_id) - { - location += '/' + location_id; - } - - window.location = location; + window.location = [window.location, start_date, end_date, $("#input_type").val() || 0, $("#location_id").val()].join("/"); }); }); \ No newline at end of file diff --git a/application/views/reports/date_input_excel_export.php b/application/views/reports/date_input_excel_export.php index 3c2347a82..67b272e9d 100644 --- a/application/views/reports/date_input_excel_export.php +++ b/application/views/reports/date_input_excel_export.php @@ -57,11 +57,7 @@ $(document).ready(function() $("#generate_report").click(function() { - var sale_type = $("#sale_type").val(); - var location = window.location + '/' + start_date + '/' + end_date + '/' + sale_type; - location += '/' + $("input[name='export_excel']:checked").val(); - - window.location = location; + window.location = [window.location, start_date, end_date, $("#sale_type").val() || 0, $("input[name='export_excel']:checked").val()].join("/"); }); }); \ No newline at end of file diff --git a/application/views/reports/excel_export.php b/application/views/reports/excel_export.php index 101fd55f8..90b8b1386 100644 --- a/application/views/reports/excel_export.php +++ b/application/views/reports/excel_export.php @@ -39,13 +39,7 @@ $(document).ready(function() { $("#generate_report").click(function() { - var export_excel = 0; - if ($("#export_excel_yes").attr('checked')) - { - export_excel = 1; - } - - window.location = window.location+'/' + export_excel; + window.location = [window.location, $("input[name='export_excel']").val()].join("/"); }); }); \ No newline at end of file diff --git a/application/views/reports/inventory_summary_input.php b/application/views/reports/inventory_summary_input.php index 3588574ee..b2e7f0d57 100644 --- a/application/views/reports/inventory_summary_input.php +++ b/application/views/reports/inventory_summary_input.php @@ -53,13 +53,7 @@ $(document).ready(function() { $("#generate_report").click(function() { - var export_excel = 0; - if ($("#export_excel_yes").attr('checked')) - { - export_excel = 1; - } - - window.location = window.location+'/' + export_excel + '/' + $("#location_id").val() + '/' + $("#item_count").val(); + window.location = [window.location, $("input[name='export_excel']").is(':checked'), $("#location_id").val(), $("#item_count").val()].join("/"); }); }); \ No newline at end of file diff --git a/application/views/reports/specific_input.php b/application/views/reports/specific_input.php index 3d4e10913..bb59451ac 100644 --- a/application/views/reports/specific_input.php +++ b/application/views/reports/specific_input.php @@ -64,19 +64,7 @@ $(document).ready(function() $("#generate_report").click(function() { - var sale_type = $("#sale_type").val(); - var location = window.location + '/' + start_date + '/' + end_date + '/' + $('#specific_input_data').val() + '/' + sale_type; - - if ($("#export_excel_yes").attr('checked')) - { - location += '/' + 1; - } - else - { - location += '/' + 0; - } - - window.location = location; + window.location = [window.location, start_date, end_date, $('#specific_input_data').val(), $("#sale_type").val(), $("input[name='export_excel']").val()].join("/"); }); }); \ No newline at end of file