Show stock location names in employee form

This commit is contained in:
jekkos-t520
2014-10-02 23:26:29 +02:00
parent 48acd204f1
commit eb51b680aa
7 changed files with 16 additions and 5 deletions

1
.gitignore vendored
View File

@@ -11,3 +11,4 @@ git-svn-diff.py
*.swp
*.rej
*.orig
*~

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 */

View File

@@ -1,5 +1,4 @@
<?php
define("PRECISION", 3);
class Receiving_lib
{

View File

@@ -1,5 +1,4 @@
<?php
define("PRECISION", 3);
class Sale_lib
{

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;
}

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;

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`