supplier chnage on category
This commit is contained in:
parent
60ac8340ac
commit
16b9ff9285
@ -1282,10 +1282,14 @@ class batchcard extends BaseController
|
||||
$data['consumable_material']= $this->batchcard_model->get_consumablematerials();
|
||||
$data['Raw_material'] = $this->batchcard_model->get_rawmaterials();
|
||||
$data['Pack_material'] = $this->batchcard_model->get_packmaterials();
|
||||
$data['supplier'] = $this->batchcard_model->getSupplierlist();
|
||||
$data['rawsupplier'] = $this->batchcard_model->Rawsupplier();
|
||||
$data['consusupplier'] = $this->batchcard_model->Consupplier();
|
||||
$data['packsupplier'] = $this->batchcard_model->Pacsupplier();
|
||||
$data['stock_value'] = $this->batchcard_model->getStockValue();
|
||||
$data['Records'] = $this->rawmaterialdetails_model->reOrderListing();
|
||||
|
||||
//echo count($data['rawsupplier']);die();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Finished Product Batch Card';
|
||||
$this->loadViews("FinalProduct", $this->global,$data,NULL);
|
||||
}
|
||||
@ -1308,6 +1312,10 @@ class batchcard extends BaseController
|
||||
$data['stock_value'] = $this->batchcard_model->getStockValue();
|
||||
|
||||
$data['Records'] = $this->rawmaterialdetails_model->reOrderListing();
|
||||
|
||||
$data['rawsupplier'] = $this->batchcard_model->Rawsupplier();
|
||||
$data['consusupplier'] = $this->batchcard_model->Consupplier();
|
||||
$data['packsupplier'] = $this->batchcard_model->Pacsupplier();
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Finished Product Batch Card';
|
||||
|
||||
@ -27,6 +27,58 @@ class batchcard_model extends CI_Model
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Rawsupplier()
|
||||
{
|
||||
|
||||
$this->db->select('mas.SupplierID,sup.SupplierName');
|
||||
$this->db->from('T_PurchaseOrder_Master mas');
|
||||
$this->db->join('T_SupplierDetailsN sup','sup.SupplierID=mas.SupplierID');
|
||||
$this->db->join('T_PurchaseOrder_LineItem line','line.PONO=mas.PONO');
|
||||
$this->db->join('T_MaterialMaster mmas','mmas.MaterialCode=line.MaterialCode');
|
||||
$this->db->where('Category','Raw Material');
|
||||
$this->db->group_by('SupplierID');
|
||||
$supp = $this->db->get();
|
||||
|
||||
|
||||
// print_r($this->db->last_query());die();
|
||||
return $supp->result();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Consupplier()
|
||||
{
|
||||
$this->db->select('mas.SupplierID,sup.SupplierName');
|
||||
$this->db->from('T_PurchaseOrder_Master mas');
|
||||
$this->db->join('T_SupplierDetailsN sup','sup.SupplierID=mas.SupplierID');
|
||||
$this->db->join('T_PurchaseOrder_LineItem line','line.PONO=mas.PONO');
|
||||
$this->db->join('T_MaterialMaster mmas','mmas.MaterialCode=line.MaterialCode');
|
||||
$this->db->where('Category','Consumables');
|
||||
$this->db->group_by('SupplierID');
|
||||
$supp = $this->db->get();
|
||||
return $supp->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Pacsupplier()
|
||||
{
|
||||
$this->db->select('mas.SupplierID,sup.SupplierName');
|
||||
$this->db->from('T_PurchaseOrder_Master mas');
|
||||
$this->db->join('T_SupplierDetailsN sup','sup.SupplierID=mas.SupplierID');
|
||||
$this->db->join('T_PurchaseOrder_LineItem line','line.PONO=mas.PONO');
|
||||
$this->db->join('T_MaterialMaster mmas','mmas.MaterialCode=line.MaterialCode');
|
||||
$this->db->where('Category','Packing material');
|
||||
$this->db->group_by('SupplierID');
|
||||
$supp = $this->db->get();
|
||||
return $supp->result();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function getStockValue()
|
||||
{
|
||||
$this->db->select('MaterialCode,stock,stockdate');
|
||||
|
||||
@ -243,9 +243,9 @@ $(function() {
|
||||
|
||||
$options = array("0"=>'Select Supplier');
|
||||
|
||||
if(!empty($supplier))
|
||||
if(!empty($rawsupplier))
|
||||
{
|
||||
foreach ($supplier as $mat):
|
||||
foreach ($rawsupplier as $mat):
|
||||
$options[$mat->SupplierID] =$mat->SupplierID.' '.' - '.' '.$mat->SupplierName;
|
||||
|
||||
|
||||
@ -355,9 +355,9 @@ $(function() {
|
||||
|
||||
$options = array("0"=>'Select Material Code');
|
||||
|
||||
if(!empty($supplier))
|
||||
if(!empty($rawsupplier))
|
||||
{
|
||||
foreach ($supplier as $mat):
|
||||
foreach ($rawsupplier as $mat):
|
||||
$options[$mat->SupplierID] =$mat->SupplierID.' '.' - '.' '.$mat->SupplierName;
|
||||
|
||||
|
||||
@ -510,9 +510,9 @@ $(function() {
|
||||
|
||||
$options = array("0"=>'Select Supplier');
|
||||
|
||||
if(!empty($supplier))
|
||||
if(!empty($consusupplier))
|
||||
{
|
||||
foreach ($supplier as $mat):
|
||||
foreach ($consusupplier as $mat):
|
||||
$options[$mat->SupplierID] =$mat->SupplierID.' '.' - '.' '.$mat->SupplierName;
|
||||
|
||||
|
||||
@ -619,9 +619,9 @@ $(function() {
|
||||
|
||||
$options = array("0"=>'Select Material Code');
|
||||
|
||||
if(!empty($supplier))
|
||||
if(!empty($consusupplier))
|
||||
{
|
||||
foreach ($supplier as $mat):
|
||||
foreach ($consusupplier as $mat):
|
||||
$options[$mat->SupplierID] =$mat->SupplierID.' '.' - '.' '.$mat->SupplierName;
|
||||
|
||||
|
||||
@ -780,9 +780,9 @@ $(function() {
|
||||
|
||||
$options = array("0"=>'Select Material Code');
|
||||
|
||||
if(!empty($supplier))
|
||||
if(!empty($packsupplier))
|
||||
{
|
||||
foreach ($supplier as $mat):
|
||||
foreach ($packsupplier as $mat):
|
||||
$options[$mat->SupplierID] =$mat->SupplierID.' '.' - '.' '.$mat->SupplierName;
|
||||
|
||||
|
||||
@ -889,9 +889,9 @@ $(function() {
|
||||
|
||||
$options = array("0"=>'Select Material Code');
|
||||
|
||||
if(!empty($supplier))
|
||||
if(!empty($packsupplier))
|
||||
{
|
||||
foreach ($supplier as $mat):
|
||||
foreach ($packsupplier as $mat):
|
||||
$options[$mat->SupplierID] =$mat->SupplierID.' '.' - '.' '.$mat->SupplierName;
|
||||
|
||||
|
||||
|
||||
@ -251,9 +251,9 @@ $(function() {
|
||||
|
||||
$options = array("0"=>'Select Supplier');
|
||||
|
||||
if(!empty($supplier))
|
||||
if(!empty($rawsupplier))
|
||||
{
|
||||
foreach ($supplier as $mat):
|
||||
foreach ($rawsupplier as $mat):
|
||||
$options[$mat->SupplierID] =$mat->SupplierID.' '.' - '.' '.$mat->SupplierName;
|
||||
|
||||
|
||||
@ -548,9 +548,9 @@ $(function() {
|
||||
|
||||
$options = array("0"=>'Select Supplier');
|
||||
|
||||
if(!empty($supplier))
|
||||
if(!empty($consusupplier))
|
||||
{
|
||||
foreach ($supplier as $mat):
|
||||
foreach ($consusupplier as $mat):
|
||||
$options[$mat->SupplierID] =$mat->SupplierID.' '.' - '.' '.$mat->SupplierName;
|
||||
|
||||
|
||||
@ -837,9 +837,9 @@ $(function() {
|
||||
|
||||
$options = array("0"=>'Select Material Code');
|
||||
|
||||
if(!empty($supplier))
|
||||
if(!empty($packsupplier))
|
||||
{
|
||||
foreach ($supplier as $mat):
|
||||
foreach ($packsupplier as $mat):
|
||||
$options[$mat->SupplierID] =$mat->SupplierID.' '.' - '.' '.$mat->SupplierName;
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user