Show stock location names in employee form

This commit is contained in:
jekkos-t520 committed 2014-10-03 00:27:50 +02:00
1 parent 48acd204f1
commit eb51b680aa
7 files changed
+16 -5

No files matched your search

+1
View File
@@ -11,3 +11,4 @@ git-svn-diff.py
*.swp
*.rej
*.orig
*~
+4
View File
@@ -36,6 +36,10 @@ define('FOPEN_READ_WRITE_CREATE', 'a+b');
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
/*
| Precision for calculations performed on decimals
*/
define("PRECISION", 3);
/* End of file constants.php */
/* Location: ./application/config/constants.php */
-1
View File
@@ -1,5 +1,4 @@
<?php
define("PRECISION", 3);
class Receiving_lib
{
-1
View File
@@ -1,5 +1,4 @@
<?php
define("PRECISION", 3);
class Sale_lib
{
-1
View File
@@ -64,7 +64,6 @@ class Stock_locations extends CI_Model
function get_location_name($location_id)
{
$this->db->from('stock_locations');
$this->db->where('deleted',0);
$this->db->where('location_id',$location_id);
return $this->db->get()->row()->location_name;
}
+9
View File
@@ -22,3 +22,12 @@ INSERT INTO `ospos_permissions` (`module_id`, `person_id`) SELECT 'reports_sales
-- add config options for tax inclusive sales
INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('tax_included', '0');
-- add cascading deletes on modules
ALTER TABLE `ospos_permissions` DROP FOREIGN KEY `ospos_permissions_ibfk_1`;
ALTER TABLE `ospos_permissions` ADD CONSTRAINT `ospos_permissions_ibfk_1` FOREIGN KEY (`person_id`) REFERENCES `ospos`.`ospos_employee`(`person_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE `ospos_permissions` DROP FOREIGN KEY `ospos_permissions_ibfk_2`;
ALTER TABLE `ospos_permissions` ADD CONSTRAINT `ospos_permissions_ibfk_2` FOREIGN KEY (`module_id`) REFERENCES `ospos`.`ospos_modules`(`module_id`) ON DELETE CASCADE ON UPDATE RESTRICT;
+2 -2
View File
@@ -675,8 +675,8 @@ ALTER TABLE `ospos_item_kit_items`
-- Constraints for table `ospos_permissions`
--
ALTER TABLE `ospos_permissions`
ADD CONSTRAINT `ospos_permissions_ibfk_1` FOREIGN KEY (`person_id`) REFERENCES `ospos_employees` (`person_id`),
ADD CONSTRAINT `ospos_permissions_ibfk_2` FOREIGN KEY (`module_id`) REFERENCES `ospos_modules` (`module_id`);
ADD CONSTRAINT `ospos_permissions_ibfk_1` FOREIGN KEY (`person_id`) REFERENCES `ospos_employees` (`person_id`) ON DELETE CASCADE,
ADD CONSTRAINT `ospos_permissions_ibfk_2` FOREIGN KEY (`module_id`) REFERENCES `ospos_modules` (`module_id`) ON DELETE CASCADE;
--
-- Constraints for table `ospos_receivings`