FIX_codecommitted : ps

This commit is contained in:
VE10-Sanjeev 2024-07-10 08:20:32 +00:00
parent c14203cbec
commit 2abe812f88
8 changed files with 42 additions and 40 deletions

View File

@ -211,6 +211,8 @@ $routes->match(['get', 'post', 'put', 'delete'],'EmergencyPO', 'Emergencypurchas
$routes->match(['get', 'post', 'put', 'delete'],'AdvanceRequest', 'Purchaseorder::advancerequest');
$routes->match(['get', 'post', 'put', 'delete'],'PORelease', 'Purchaseorder::porelease');
$routes->match(['get', 'post', 'put', 'delete'],'ViewPO', 'Purchaseorder::viewfullpurchaseorder');
$routes->match(['get', 'post', 'put', 'delete'],'purchaseorder/EditImportPurchaseOrder', 'Purchaseorder::EditImportPurchaseOrder');
$routes->match(['get', 'post', 'put', 'delete'],'purchaseorder/EditCapitalPurchaseOrder', 'Purchaseorder::EditCapitalPurchaseOrder');
// $routes->match(['get', 'post', 'put', 'delete'],'POApproval', 'Purchaseorder::poapproval');
$routes->get('amendmentpurchaseorder','Amendmentpurchaseorder::index');

View File

@ -920,13 +920,13 @@ class Amendmentpurchaseorder extends BaseController
}
$updatedBy = $this->session->get('userId');
$AmendmentNewPoNo = generate_amendment_po_number($PONO);
$POMaster = array('PONO' =>$AmendmentNewPoNo,'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $FinalTotalOrder, 'POType' => $POType, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'CapitalRange' => $PoRange, 'ExchangeRate' => $ExchangeRate, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'PaymentTerms' => $PaymentMethod, 'PaymentOtherDescription' => $Otherpayment, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CurrencyType' => $currencytypeID, 'AmendedDetails' => $MAD, 'Import_DispatchDetails' => $curdispatch, 'Import_PlaceofOrgin' => $PlaceOforigin, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult);
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO);
foreach ($LastPO as $PO) :
$NewPO = $PO['PONO'];
endforeach;
if (count($LastPO) > 0) {
$NewPO = $LastPO[0]['PONO'];
}
$PODetail = array('Status' => PO_AMENDED); //TO SET PARENT PO AS AMENDMENT STATUS
@ -1297,10 +1297,12 @@ class Amendmentpurchaseorder extends BaseController
$POMaster = array('PONO' =>$AmendmentNewPoNo,'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'Import_DispatchDetails' => $Dispatch, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ExchangeRate' => $Exchangerate, 'ExchangeRateCalculatedon' => $ExchangeRateCalculatedon, 'CurrencyType' => $CurrencyType, 'PaymentTerms' => $PaymentTerms, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Mode_Of_Shipment' => $Shipmentmode, 'Supplier_Reference' => $SupplierRef, 'Supplier_Offer_No' => $SupplierOffer, 'Other_Reference' => $otherRef, 'Fincap' => $finCap, 'AmendedDetails' => $MAD, 'PaymentOtherDescription' => $OtherPayment, 'InsuranceStatus' => $insurestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $importoption, 'IsQualityChkReqired' => $qtycheckresult);
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO);
$NewPO = '';
if (count($LastPO) > 0) {
$NewPO = $LastPO[0]['PONO'];
}
// if (count($LastPO) > 0) {
// $NewPO = $LastPO[0]['PONO'];
// }
foreach ($LastPO as $PO) :
$NewPO = $PO['PONO'];
endforeach;
$PODetail = array('Status' => PO_AMENDED); //TO SET PARENT PO AS AMENDMENT STATUS
$APO = $this->purchaseorder_model->updateAmendPOMaster($PONO, $PODetail);
@ -1458,7 +1460,7 @@ class Amendmentpurchaseorder extends BaseController
$CAD = $CAD . "<tr><td>Current Freight Type: " . $beforeFreightType . "</td><td>Revised Freight Type:" . $FreightType . "</td></tr>";
}
if ($NoOfTrip - $beforeNoOfTrip) {
if ((float)$NoOfTrip - (float)$beforeNoOfTrip) {
$rowspanvalue++;
$CAD = $CAD . "<tr><td>Current No of Trip: " . $beforeNoOfTrip . "</td><td>Revised Additional Excise duty:" . $NoOfTrip . "</td></tr>";

View File

@ -2656,10 +2656,7 @@ $mpdf->use_kwt = true;
$CustomDutyExpensesPerKG = $this->request->getPost('CustomDutyExpenses' . $i);
$TaxtotalOrderValue = $itemRate * $Quantity + $OtherAmt + $AfterCgst + $AfterSgst + $AfterIgst - $AfterDiscount;
$TaxtotalOrderValue = (float)$itemRate * (float)$Quantity + (float)$OtherAmt + (float)$AfterCgst + (float)$AfterSgst + (float)$AfterIgst - (float)$AfterDiscount;
$CapitalItemDescription = $this->request->getPost('CapitalItemDescrition' . $i);
$Per = $this->request->getPost('per' . $i);

View File

@ -1,4 +1,7 @@
<?php
$AvlCapitalBudAmt = isset($AvlCapitalBudAmt) ? (int)$AvlCapitalBudAmt : 0;
$RequesterName='';
$insuranceStatus = array(
array("name"=>"NO","value"=>"0"),array("name"=>"YES","value"=>"1")
);

View File

@ -1,4 +1,5 @@
<?php
$AvlCapitalBudAmt = isset($AvlCapitalBudAmt) ? (int)$AvlCapitalBudAmt : 0;
$insuranceStatus = array(
array("name"=>"NO","value"=>"0"),array("name"=>"YES","value"=>"1")
);
@ -6295,9 +6296,10 @@ $("#EdittxtTotalOrderValue").val('');
}
function Save(status)
{ //alert('save function');
{ alert('save function - what are you doing'); }
function Save(status)
{
if(status == '0')
{
stat = '<?php echo PO_DRAFT; ?>';

View File

@ -1498,7 +1498,7 @@ echo form_textarea($data);
<input type="hidden" name="<?php echo 'departmentName'.$index ?>" id="<?php echo 'departmentName'.$index ?>" value="<?php echo $record->DepartmentName ; ?>" />
<!-- <input type="hidden" name="<?php echo 'AvlBudAmt'.$index ?>" id="<?php echo 'AvlBudAmt'.$index ?>" value="<?php echo $AvlBudAmt;?>" /> -->
<!-- <input type="hidden" name="<?php //echo 'AvlBudAmt'.$index ?>" id="<?php //echo 'AvlBudAmt'.$index ?>" value="<?php //echo $AvlBudAmt;?>" /> -->
<input type="hidden" name="<?php echo 'LineItemNo'.$index ?>" id="<?php echo 'LineItemNo'.$index ?>" value="<?php echo $record->LineItemNo ; ?>" />
@ -3260,17 +3260,17 @@ function validateEditExceedLimit()
exp=basicAmountRate*exchangerate;
//console.log(exp);
if(exp > totavlbud || totalAmount > totavlbud)
{
alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
$('#EditRate').focus();
return false;
}
else
{
return true;
}
// if(exp > totavlbud || totalAmount > totavlbud)
// {
// alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
// $('#EditRate').focus();
// return false;
// }
// else
// {
// return true;
// }
return true; // newly added.
}

View File

@ -2773,7 +2773,7 @@ echo form_textarea($data);
<input type="hidden" name="<?php echo 'Reqnumber'.$index ?>" id="<?php echo 'Reqnumber'.$index ?>" value="<?php echo $record->ReqNo ; ?>" />
<input type="hidden" name="<?php echo 'departmentName'.$index ?>" id="<?php echo 'departmentName'.$index ?>" value="<?php echo $record->DepartmentName ; ?>" />
<!--<input type="hidden" name="<?php echo 'AvlBudAmt'.$index ?>" id="<?php echo 'AvlBudAmt'.$index ?>" value="<?php echo $record->AvlBudAmt ; ?>" /> -->
<!--<input type="hidden" name="<?php //echo 'AvlBudAmt'.$index ?>" id="<?php //echo 'AvlBudAmt'.$index ?>" value="<?php //echo $record->AvlBudAmt ; ?>" /> -->
<input type="hidden" name="<?php echo 'AvlBudAmt'.$index ?>" id="<?php echo 'AvlBudAmt'.$index ?>" value="<?php echo "$AvlAmount" ; ?>" />
<input type="hidden" name="<?php echo 'LineItemNo'.$index ?>" id="<?php echo 'LineItemNo'.$index ?>" value="<?php echo $record->LineItemNo ; ?>" />

View File

@ -160,19 +160,15 @@
$purchaseorderDate = (!empty($POItem) && !empty($POItem[0]->PODate)) ? new DateTime($POItem[0]->PODate, new DateTimeZone('Asia/Kolkata')) : "";
$poDate = $purchaseorderDate ? $purchaseorderDate->format('d-m-Y') : "-";
$IsOpenOrder = (!empty($POItem) && !empty($POItem[0]->IsOpenOrder)) ? $POItem[0]->IsOpenOrder : "";
$DeliveryDate = "";
$DeliverySchedule = "";
if (!empty($POItem) && !empty($POItem[0]->DeliveryOption)) {
if ($POItem[0]->DeliveryOption == 1) {
$DeliverySchedule = $POItem[0]->DeliverySchedule;
$DeliveryDate = "";
} else if ($POItem[0]->DeliveryOption == 0 && !empty($POItem[0]->DeliveryDate)) {
$dtDe = new DateTime($POItem[0]->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
$DeliveryDate = $dtDe ? $dtDe->format('d-m-Y') : "";
$DeliverySchedule = "";
}
} else {
$DeliveryDate = "";
$DeliverySchedule = "";
}
$RequistionNo = (!empty($RequistionDetails) && !empty($RequistionDetails[0]['RequistionNo'])) ? $RequistionDetails[0]['RequistionNo'] : "-";
$ReqDate = (!empty($RequistionDetails) && !empty($RequistionDetails[0]['ReqDate'])) ? $RequistionDetails[0]['ReqDate'] : "";
@ -295,7 +291,7 @@
<div id="logo"><?php echo invoice_logo_pdf(); ?></div>
</td>
<td rowspan="5" style="border-left: none; border-right: none;" width="50%">
<p style="font-size:1em;"><b><?php _htmlsc($CompanyName); ?></b></p>
<p style="font-size:1em;"><b><?php $CompanyName ? _htmlsc($CompanyName) : ""; ?></b></p>
<?php if ($CompanyAddress) {
echo '<div>' . htmlsc($CompanyAddress) . ' ' . '</div>';
@ -599,26 +595,26 @@
</td>
<td class="text-right no-border"><?php echo number_alignment($item->Rate); ?></td>
<td class="text-right no-border"><?php echo number_alignment(abs($item->BasicValue)); ?></td>
<td class="text-right no-border"><?php _htmlsc($item->CGST); ?></td>
<td class="text-right no-border"><?php if(isset($item->CGST) && $item->CGST != '' ){ _htmlsc($item->CGST); }else{ echo 0; } ?></td>
<td class="text-right no-border"><?php if (isset($item->AfterCGST) && $item->AfterCGST != '') {
echo number_alignment(abs($item->AfterCGST));
} else {
echo '0.00';
} ?></td>
<td class="text-right no-border"><?php _htmlsc($item->SGST); ?></td>
<td class="text-right no-border"><?php if(isset($item->SGST) && $item->SGST != '' ){ _htmlsc($item->SGST); }else{ echo 0; } ?></td>
<td class="text-right no-border"><?php if (isset($item->AfterSGST) && $item->AfterSGST != '') {
echo number_alignment(abs($item->AfterSGST));
} else {
echo '0.00';
} ?></td>
<td class="text-right no-border"><?php _htmlsc($item->IGST); ?></td>
<td class="text-right no-border"><?php if(isset($item->IGST) && $item->IGST != '' ){ _htmlsc($item->IGST); }else{ echo 0; } ?></td>
<td class="text-right no-border"><?php if (isset($item->AfterIGST) && $item->AfterIGST != '') {
echo number_alignment(abs($item->AfterIGST));
} else {
echo '0.00';
} ?></td>
<td class="text-right no-border" style="vertical-align: middle;"><?php
$totalwithtax = $item->Taxamount + $item->BasicValue;
$totalwithtax = (isset($item->Taxamount) ? $item->Taxamount : 0 ) + $item->BasicValue;
echo number_alignment(abs($totalwithtax));
?></td>
</tr>