latest commit 06-06-2025
This commit is contained in:
parent
6efba5bf7b
commit
db3bc89ff0
@ -291,15 +291,8 @@ class Supplier extends BaseController
|
|||||||
|
|
||||||
if($PAN){ $supplier['PAN'] = $PAN;}
|
if($PAN){ $supplier['PAN'] = $PAN;}
|
||||||
if($GSTNo){ $supplier['GSTNO'] = $GSTNo;}
|
if($GSTNo){ $supplier['GSTNO'] = $GSTNo;}
|
||||||
if ($file2 && $file2->isValid() && !$file2->hasMoved()) {
|
|
||||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
/********************** File Insertion - MSME **************************/
|
||||||
$GST_DOC = $file2->getName();
|
|
||||||
$file2->move($path,$GST_DOC);
|
|
||||||
$supplier['Cert_GST'] = $GST_DOC;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$supplier['Cert_GST'] = $this->request->getPost('hidden_Cert_GST') ? $this->request->getPost('hidden_Cert_GST') : NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($file1 && $file1->isValid() && !$file1->hasMoved()) {
|
if ($file1 && $file1->isValid() && !$file1->hasMoved()) {
|
||||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||||
@ -311,6 +304,18 @@ class Supplier extends BaseController
|
|||||||
$supplier['Cert_MSME'] = $this->request->getPost('hidden_Cert_MSME') ? $this->request->getPost('hidden_Cert_MSME') : NULL;
|
$supplier['Cert_MSME'] = $this->request->getPost('hidden_Cert_MSME') ? $this->request->getPost('hidden_Cert_MSME') : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/********************** GST *******************************************/
|
||||||
|
if ($file2 && $file2->isValid() && !$file2->hasMoved()) {
|
||||||
|
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||||
|
$GST_DOC = $file2->getName();
|
||||||
|
$file2->move($path,$GST_DOC);
|
||||||
|
$supplier['Cert_GST'] = $GST_DOC;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$supplier['Cert_GST'] = $this->request->getPost('hidden_Cert_GST') ? $this->request->getPost('hidden_Cert_GST') : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/********************** BANK *******************************************/
|
||||||
if ($file3 && $file3->isValid() && !$file3->hasMoved()) {
|
if ($file3 && $file3->isValid() && !$file3->hasMoved()) {
|
||||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||||
$BANK_DOC = $file3->getName();
|
$BANK_DOC = $file3->getName();
|
||||||
@ -321,6 +326,7 @@ class Supplier extends BaseController
|
|||||||
$supplier['Cert_BANK'] = $this->request->getPost('hidden_Cert_BANK') ? $this->request->getPost('hidden_Cert_BANK') : NULL;
|
$supplier['Cert_BANK'] = $this->request->getPost('hidden_Cert_BANK') ? $this->request->getPost('hidden_Cert_BANK') : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/********************** PAN *******************************************/
|
||||||
if ($file4 && $file4->isValid() && !$file4->hasMoved()) {
|
if ($file4 && $file4->isValid() && !$file4->hasMoved()) {
|
||||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||||
$PAN_DOC = $file4->getName();
|
$PAN_DOC = $file4->getName();
|
||||||
@ -331,6 +337,8 @@ class Supplier extends BaseController
|
|||||||
$supplier['Cert_PAN'] = $this->request->getPost('hidden_Cert_PAN') ? $this->request->getPost('hidden_Cert_PAN') : NULL;
|
$supplier['Cert_PAN'] = $this->request->getPost('hidden_Cert_PAN') ? $this->request->getPost('hidden_Cert_PAN') : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/********************** End Of File Insertion *************************/
|
||||||
|
|
||||||
$result = $this->supplier_model->UpdateSupplier($supplier, $SupplierID);
|
$result = $this->supplier_model->UpdateSupplier($supplier, $SupplierID);
|
||||||
|
|
||||||
if ($result == True) {
|
if ($result == True) {
|
||||||
|
|||||||
@ -3285,7 +3285,7 @@ function daybeforetotal($yesterday){
|
|||||||
SUM(CASE WHEN date = '$startDate' THEN opening ELSE 0 END) + SUM(receipt) as total,
|
SUM(CASE WHEN date = '$startDate' THEN opening ELSE 0 END) + SUM(receipt) as total,
|
||||||
SUM(used) as used,
|
SUM(used) as used,
|
||||||
SUM(CASE WHEN date = '$startDate' THEN opening ELSE 0 END) + SUM(receipt) - SUM(used) as closing
|
SUM(CASE WHEN date = '$startDate' THEN opening ELSE 0 END) + SUM(receipt) - SUM(used) as closing
|
||||||
FROM t_resinStockDetails tbg
|
FROM t_resinstockdetails tbg
|
||||||
INNER JOIN t_materialmaster tmm ON tmm.MaterialCode = tbg.materialCode
|
INNER JOIN t_materialmaster tmm ON tmm.MaterialCode = tbg.materialCode
|
||||||
INNER JOIN t_igr_details tigrd ON tigrd.MaterialCode = tbg.materialCode AND Date(tigrd.CreatedDate) >= '$startDate' AND Date(tigrd.CreatedDate) <= '$endDate'
|
INNER JOIN t_igr_details tigrd ON tigrd.MaterialCode = tbg.materialCode AND Date(tigrd.CreatedDate) >= '$startDate' AND Date(tigrd.CreatedDate) <= '$endDate'
|
||||||
INNER JOIN t_igr_master tigrm ON tigrd.IGRNO = tigrm.IGRNO
|
INNER JOIN t_igr_master tigrm ON tigrd.IGRNO = tigrm.IGRNO
|
||||||
|
|||||||
@ -645,7 +645,7 @@ class Ipinvoice_model extends Model
|
|||||||
/************************************************************* Resin ****************************************************************/
|
/************************************************************* Resin ****************************************************************/
|
||||||
case "resin":
|
case "resin":
|
||||||
|
|
||||||
$builder = $this->db->table('t_resinStockDetails trd')
|
$builder = $this->db->table('t_resinstockdetails trd')
|
||||||
->select('trd.balanceStock, tmm.MaterialName ,tmm.MaterialCode ,tmm.UOM')
|
->select('trd.balanceStock, tmm.MaterialName ,tmm.MaterialCode ,tmm.UOM')
|
||||||
->join('t_materialmaster tmm', 'tmm.MaterialCode = trd.materialCode')
|
->join('t_materialmaster tmm', 'tmm.MaterialCode = trd.materialCode')
|
||||||
->where('trd.date', $lastDateOfCurrentMonth)
|
->where('trd.date', $lastDateOfCurrentMonth)
|
||||||
@ -679,7 +679,7 @@ class Ipinvoice_model extends Model
|
|||||||
default:
|
default:
|
||||||
|
|
||||||
|
|
||||||
$builder = $this->db->table('t_resinStockDetails trd')
|
$builder = $this->db->table('t_resinstockdetails trd')
|
||||||
->select('trd.balanceStock, tmm.MaterialName ,tmm.MaterialCode , tmm.UOM')
|
->select('trd.balanceStock, tmm.MaterialName ,tmm.MaterialCode , tmm.UOM')
|
||||||
->join('t_materialmaster tmm', 'tmm.MaterialCode = trd.materialCode')
|
->join('t_materialmaster tmm', 'tmm.MaterialCode = trd.materialCode')
|
||||||
->where('trd.date', $lastDateOfCurrentMonth)
|
->where('trd.date', $lastDateOfCurrentMonth)
|
||||||
|
|||||||
@ -6,7 +6,7 @@ use CodeIgniter\Model;
|
|||||||
|
|
||||||
class ResinStockModel extends Model
|
class ResinStockModel extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_resinStockDetails';
|
protected $table = 't_resinstockdetails';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
protected $useAutoIncrement = true;
|
protected $useAutoIncrement = true;
|
||||||
protected $returnType = 'array';
|
protected $returnType = 'array';
|
||||||
|
|||||||
@ -209,7 +209,7 @@ class Supplier_model extends Model
|
|||||||
$builder = $builder->select('SupplierID, SupplierName, Address, IsActive');
|
$builder = $builder->select('SupplierID, SupplierName, Address, IsActive');
|
||||||
|
|
||||||
if(!empty($supp_id)){
|
if(!empty($supp_id)){
|
||||||
$builder = $builder->where('SupplierID !=' , $supp_id);
|
$builder = $builder->where('SupplierID <>' , $supp_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$builder = $builder->where('REPLACE(SupplierName, " ", "") ',$supp_name);
|
$builder = $builder->where('REPLACE(SupplierName, " ", "") ',$supp_name);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user