From 6e989c3e9c7c5c5786ad3fba7552cafdf13bf250 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Thu, 29 Aug 2024 04:07:23 +0000 Subject: [PATCH] edit service and revenue --- app/Views/EditservicePurchaseorder.php | 5539 ++++++++++++------------ app/Views/editRevenuepurchaseorder.php | 2 + 2 files changed, 2706 insertions(+), 2835 deletions(-) diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index bb2c0fdc..ad31b7fc 100644 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -1,6 +1,7 @@ "NO", "value" => "0"), array("name" => "YES", "value" => "1") + array("name" => "NO", "value" => "0"), + array("name" => "YES", "value" => "1") ); $DeliverOption = ''; $SupId = ''; @@ -716,9 +717,7 @@ if (!empty($getlogpodtl)) { });
@@ -764,12 +758,12 @@ if (!empty($getlogpodtl)) {
- -

- -

- - Back + +

+ +

+ + Back
@@ -779,2009 +773,2073 @@ if (!empty($getlogpodtl)) {
- - 'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO', 'enctype' => 'multipart/form-data'); echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> - -
-
-
-
-
- - 'Selected Requisition Numbers'); - if (!empty($ReqList)) { - foreach ($ReqList as $SID) : - - $options[$SID->ReqNo] = $SID->ReqNo; - endforeach; - } - echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"'); - - ?> -
-
- -
- - 'POType', 'value' => set_value('POType', SERVICE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
- - 'Select Supplier'); - //print_r( $options); - - if (!empty($Suplist)) { - foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; - endforeach; - } - - echo form_dropdown('drpSupplier', $options, set_value('drpSupplier', $SupId), 'id="drpSupplier"', 'required="true"', 'class="form-control select2'); - - ?> - - - -
-
- -
- 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
- -
-
-
-
-
- - StatusCode) { - $optionsWork[$WorkSID->StatusCode] = $WorkSID->StatusName; - } - - - endforeach; - foreach ($WorkStatus as $SID) : - if ($WrkStatus != $SID->StatusCode) { - $optionsWork[$SID->StatusCode] = $SID->StatusName; - } - - - endforeach; - } - - echo form_dropdown('workstatus', $optionsWork, set_value('workstatus'), 'id="workstatus"', 'required="true"', 'class="form-control select2'); - - ?> -
-
- Select Delivery By*
-
- 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> - 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?> -
- -
-
- -
- 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
-
- -
- -
- 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> - -
-
- -
-
-
-
-
- -
- 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
-
-
- -
- - 'editmodeofshipment', 'value' => set_value('editmodeofshipment', $ModeOfShipment), 'id' => 'editmodeofshipment', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
- -
- - 'editsupplierreference', 'value' => set_value('editsupplierreference', $SupplierReference), 'id' => 'editsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); - echo form_input($data); - ?> -
-
-
- -
- - 'editsupplierofferno', 'value' => set_value('editsupplierofferno', $SuppliersOfferNo), 'id' => 'editsupplierofferno', 'class' => 'form-control'); - echo form_input($data); - ?> -
- -
-
-
-
-
-
-
- - -
- - 'editotherreference', 'value' => set_value('editotherreference', $OtherReferences), 'id' => 'editotherreference', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
- -
-
- - - -
- - 'Select Work Status'); - - - if (!empty($PoTypeOptions)) { - foreach ($PoTypeOptions as $POpt) : - - if ($ServiceTypeOptions == $POpt->ConfigValue) { - $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; - } - endforeach; - foreach ($PoTypeOptions as $POpt1) : - - if ($ServiceTypeOptions != $POpt1->ConfigValue) { - $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; - } - endforeach; - } - - echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions"', 'required="true"', 'class="form-control select2'); - - - ?> -
- - - -
-
- - PaymentID) { - $optionsPay[$pay2->PaymentID] = $pay2->PaymentTerms; - } - endforeach; - foreach ($Payment as $pay1) : - if ($Terms != $pay1->PaymentID) { - $optionsPay[$pay1->PaymentID] = $pay1->PaymentTerms; - } - endforeach; - } - echo form_dropdown('PaymentTerms', $optionsPay, set_value('PaymentTerms'), 'id="PaymentTerms"', 'required="true"', 'class="form-control select2'); - ?> -
- -
-
-
-
-
- -
- - -
- - - - -
-
- -
- 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); - echo form_input($data); - ?> -
-
-
- - -
-
-
-
-
-
- -
- -
- > IS THIS OPEN ORDER FORMAT -
-
- - -
- -
- - - - - -
-
- - -
-
-
- - - - - - - - - - - - - - - - - - - - Schedule_Type != 'Recurring') { - $FrequencyNo = intval(1); - $Frequency = 'One Time'; - } else { - $FrequencyNo = $record->NumberOfService; - $Frequency = $record->Service_Period; - } - - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - After_CGST; - $TotalSgst = $TotalSgst + $record->After_SGST; - $TotalIgst = $TotalIgst + $record->After_IGST; - $OtherAmt = $OtherAmt + $record->otherallowance; - $TotalSummary = $TotalSummary + $record->TotalValue; - - - $TotalBasicAmount = $TotalBasicAmount + $record->BasicValue * $FrequencyNo; - } - ?> +
+
+
+ 'Selected Requisition Numbers'); + if (!empty($ReqList)) { + foreach ($ReqList as $SID) : + $options[$SID->ReqNo] = $SID->ReqNo; + endforeach; } - ?> -
-
SNoRequisition NoItem CodeItem NameQuantityUOMRate Basic Amount Tax Amount Total Order Amount Action
ReqNo ?>MaterialCode ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>BasicValue * $FrequencyNo, 2, '.', ''); ?>Taxamount ?>TotalValue ?>     - -    
-
-
-
-
+ echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"'); -
- - 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($TotalBasicAmount, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
- - 'txtTotCgst', 'value' => set_value('txtTotCgst', number_format($TotalCgst, 2, '.', '')), 'id' => 'txtTotCgst', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); ?>
+
+ +
- -
- - 'txtTotSgst', 'value' => set_value('txtTotSgst', number_format($TotalSgst, 2, '.', '')), 'id' => 'txtTotSgst', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> + 'POType', 'value' => set_value('POType', SERVICE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
-
- +
+ 'txtTotIgst', 'value' => set_value('txtTotIgst', number_format($TotalIgst, 2, '.', '')), 'id' => 'txtTotIgst', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> -
+ $options = array("0" => 'Select Supplier'); + //print_r( $options); -
- - 'ToatalOtherAllowances', 'value' => set_value('ToatalOtherAllowances', number_format($OtherAmt, 2, '.', '')), 'id' => 'ToatalOtherAllowances', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> + if (!empty($Suplist)) { + foreach ($Suplist as $SID) : + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; + endforeach; + } + + echo form_dropdown('drpSupplier', $options, set_value('drpSupplier', $SupId), 'id="drpSupplier"', 'required="true"', 'class="form-control select2'); + + ?> + +
-
- - 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($TotalSummary, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> - +
+ +
+ 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
-
- -
- -
+
+
+ 'editdescofpo', 'value' => set_value('editdescofpo', strip_tags($DescriptionOfPo)), 'id' => 'editdescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); - echo form_textarea($data); - ?> -
-
- -
-
- 'ScopeofWork', 'value' => set_value('ScopeofWork', strip_tags($ServiceDescription)), 'id' => 'ScopeofWork', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); - echo form_textarea($data); - ?> -
- -
+ if (!empty($WorkStatus)) { - - -
-
- - -
- - -
- -
- - -
- - - - -
- - - - - - - - - - - - - - - $gd) { - - ?> - - - - - - - - - - - - - StatusCode) { + $optionsWork[$WorkSID->StatusCode] = $WorkSID->StatusName; } - ?> - -
Bill No FileAction
BillNo ?>FilePath)) ? $gd->FilePath : "No File"; ?> - FilePath)) { ?> - - -
+ + + endforeach; + foreach ($WorkStatus as $SID) : + if ($WrkStatus != $SID->StatusCode) { + $optionsWork[$SID->StatusCode] = $SID->StatusName; + } + + + endforeach; + } + + echo form_dropdown('workstatus', $optionsWork, set_value('workstatus'), 'id="workstatus"', 'required="true"', 'class="form-control select2'); + + ?> +
+
+ Select Delivery By*
+
+ 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> + 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?> +
+ +
+
+ +
+ 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+ +
+ +
+ 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> + +
+
+ +
+
+
+ +
+ 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+
+ +
+ + 'editmodeofshipment', 'value' => set_value('editmodeofshipment', $ModeOfShipment), 'id' => 'editmodeofshipment', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+ +
+ + 'editsupplierreference', 'value' => set_value('editsupplierreference', $SupplierReference), 'id' => 'editsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); + echo form_input($data); + ?> +
+
+
+ +
+ + 'editsupplierofferno', 'value' => set_value('editsupplierofferno', $SuppliersOfferNo), 'id' => 'editsupplierofferno', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+
+
+ + +
+ + 'editotherreference', 'value' => set_value('editotherreference', $OtherReferences), 'id' => 'editotherreference', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+ +
+
+ +
- -
-
- - - - - - - - - - - - - + - + //$optionsWork = array("0"=>'Select Work Status'); - - - + if (!empty($PoTypeOptions)) { + foreach ($PoTypeOptions as $POpt) : - - - - - - - entity == 'PO DateChanged') { - $oldValue = date('d-m-Y', strtotime($oldpo->oldValue)); - } else { - $oldValue = $oldpo->oldValue; - } ?> - - - entity == 'PO DateChanged') { - $newValue = date('d-m-Y', strtotime($oldpo->newValue)); - } else { - $newValue = $oldpo->newValue; - } ?> - - - - - - - - ConfigValue) { + $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; } - ?> - - -
SnoPONOLineItemNoEntityOldValueNewValueUpdatedByUpdateOn
PONO ?>LineItemNos; ?>entity ?>SupplierName; ?>FirstName ?>UpdatedOn); - echo $date->format('d-m-Y'); ?>
-
-
+ endforeach; + foreach ($PoTypeOptions as $POpt1) : + + if ($ServiceTypeOptions != $POpt1->ConfigValue) { + $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; + } + endforeach; + } + + echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions"', 'required="true"', 'class="form-control select2'); - - - - - - - - - - - - -
- -

- - - - - - - - -   Cancel - -   Save - -   Submit -   Approve - -   OK -   Submit - -   OK -   Submit - - + ?>
+ +
+
+ + PaymentID) { + $optionsPay[$pay2->PaymentID] = $pay2->PaymentTerms; + } + endforeach; + foreach ($Payment as $pay1) : + if ($Terms != $pay1->PaymentID) { + $optionsPay[$pay1->PaymentID] = $pay1->PaymentTerms; + } + endforeach; + } + echo form_dropdown('PaymentTerms', $optionsPay, set_value('PaymentTerms'), 'id="PaymentTerms"', 'required="true"', 'class="form-control select2'); + ?> +
+ +
+
+
+ +
-
- -
- - - 'AWAITING APPROVE', - 'AWAITING RELEASE' => 'AWAITING APPROVE', - 'RELEASER ONHOLD' => 'APPROVER ONHOLD', - 'PO RELEASED' => 'PO APPROVED', - ]; + +
+ + + + +
+
+ +
+ 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); + echo form_input($data); + ?> +
+
+
+ + +
+
+
+
+ +
+ +
+ > IS THIS OPEN ORDER FORMAT +
+
+ + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + Schedule_Type != 'Recurring') { + $FrequencyNo = intval(1); + $Frequency = 'One Time'; } else { - echo $StatusName; + $FrequencyNo = $record->NumberOfService; + $Frequency = $record->Service_Period; } - } else { - echo "Status not provided"; + + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + After_CGST; + $TotalSgst = $TotalSgst + $record->After_SGST; + $TotalIgst = $TotalIgst + $record->After_IGST; + $OtherAmt = $OtherAmt + $record->otherallowance; + $TotalSummary = $TotalSummary + $record->TotalValue; + + + $TotalBasicAmount = $TotalBasicAmount + $record->BasicValue * $FrequencyNo; } ?> - - - - + + +
SNoRequisition NoItem CodeItem NameQuantityUOMRate Basic Amount Tax Amount Total Order Amount Action
ReqNo ?>MaterialCode ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>BasicValue * $FrequencyNo, 2, '.', ''); ?>Taxamount ?>TotalValue ?>     + +    
+
+
+
+ + 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($TotalBasicAmount, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'txtTotCgst', 'value' => set_value('txtTotCgst', number_format($TotalCgst, 2, '.', '')), 'id' => 'txtTotCgst', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'txtTotSgst', 'value' => set_value('txtTotSgst', number_format($TotalSgst, 2, '.', '')), 'id' => 'txtTotSgst', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'txtTotIgst', 'value' => set_value('txtTotIgst', number_format($TotalIgst, 2, '.', '')), 'id' => 'txtTotIgst', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'ToatalOtherAllowances', 'value' => set_value('ToatalOtherAllowances', number_format($OtherAmt, 2, '.', '')), 'id' => 'ToatalOtherAllowances', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> + +
+
+ + 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($TotalSummary, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control num', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ +
+ +
+ 'editdescofpo', 'value' => set_value('editdescofpo', strip_tags($DescriptionOfPo)), 'id' => 'editdescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); + echo form_textarea($data); + ?> +
+
+ +
+ + 'ScopeofWork', 'value' => set_value('ScopeofWork', strip_tags($ServiceDescription)), 'id' => 'ScopeofWork', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); + echo form_textarea($data); + ?> +
-
-
-
+
+ + + +
+ + +
+ +
+ + +
+ + + + +
+ + + + + + + + + + + + + + + $gd) { + + ?> + + + + + + + + + +
Bill No FileAction
BillNo ?>FilePath)) ? $gd->FilePath : "No File"; ?> + FilePath)) { ?> + + +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + entity == 'PO DateChanged') { + $oldValue = date('d-m-Y', strtotime($oldpo->oldValue)); + } else { + $oldValue = $oldpo->oldValue; + } ?> + + + entity == 'PO DateChanged') { + $newValue = date('d-m-Y', strtotime($oldpo->newValue)); + } else { + $newValue = $oldpo->newValue; + } ?> + + + + + + + + + + +
SnoPONOLineItemNoEntityOldValueNewValueUpdatedByUpdateOn
PONO ?>LineItemNos; ?>entity ?>SupplierName; ?>FirstName ?>UpdatedOn); + echo $date->format('d-m-Y'); ?>
+
+
+ +
+ +

+ + + + + + + + +   Cancel + +   Save + +   Submit +   Approve + +   OK +   Submit + +   OK +   Submit + + +
+ +
+ +
+ +
+ + + 'AWAITING APPROVE', + 'AWAITING RELEASE' => 'AWAITING APPROVE', + 'RELEASER ONHOLD' => 'APPROVER ONHOLD', + 'PO RELEASED' => 'PO APPROVED', + ]; + + if (isset($StatusName) && !empty($StatusName)) { + if (isset($statusMappings[$StatusName])) { + echo $statusMappings[$StatusName]; + } else { + echo $StatusName; + } + } else { + echo "Status not provided"; + } + ?> +
+
+
+
+
+
+
+
+
+ + -
-
+
+ +