diff --git a/app/Config/Routes.php b/app/Config/Routes.php index cf3212bb..33bc631f 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -270,6 +270,7 @@ $routes->post('editExpense', 'Expense::editExpense'); $routes->post('getExpenseDetails', 'Expense::getExpenseDetails'); $routes->get('uploads/(:any)', 'Expense::downloads/$1'); $routes->post('deleteFile', 'Expense::deleteFile'); +$routes->get('downloadFile/(:any)', 'Expense::downloads/$1'); // Application OGR Page diff --git a/app/Controllers/Expense.php b/app/Controllers/Expense.php index 7465b323..64c0d7ab 100644 --- a/app/Controllers/Expense.php +++ b/app/Controllers/Expense.php @@ -39,18 +39,21 @@ class Expense extends BaseController $file->move(WRITEPATH . 'uploads', $fileName); } + $status = $this->request->getPost('status'); + $paymentMethod = $status === 'Paid' ? $this->request->getPost('payment_method') : 0; + $data = [ 'transporter_file' => $fileName, 'supplier_id' => $this->request->getPost('supplierid'), 'remarks' => $this->request->getPost('remarks'), 'cost' => $this->request->getPost('cost'), 'gst' => $this->request->getPost('gst'), - 'total' => $this->request->getPost('total'), - 'status' => $this->request->getPost('status'), - 'payment_method' => $this->request->getPost('payment_method') + 'total' => (int)$this->request->getPost('gst') + (int)$this->request->getPost('cost'), + 'status' => $status, + 'payment_method' => $paymentMethod ]; - $insert_id = $this->expense_model->insertExpense($data); + $insert_id = $this->expense_model->insertExpense($data); if ($insert_id) { return json_encode('true'); } else { @@ -83,18 +86,23 @@ class Expense extends BaseController $fileName = $this->request->getPost('existing_file'); // Use existing file if no new file is uploaded } + $status = $this->request->getPost('status'); + $paymentMethod = $status === 'Paid' ? $this->request->getPost('payment_method') : 0; + $data = [ 'supplier_id' => $this->request->getPost('supplierid'), 'remarks' => $this->request->getPost('remarks'), 'cost' => $this->request->getPost('cost'), 'gst' => $this->request->getPost('gst'), - 'total' => $this->request->getPost('total'), - 'status' => $this->request->getPost('status'), - 'payment_method' => $this->request->getPost('payment_method') + 'total' => (int)$this->request->getPost('gst') + (int)$this->request->getPost('cost'), + 'status' => $status, + 'payment_method' => $paymentMethod ]; if(!empty($fileName)){ $data['transporter_file'] = $fileName; } + $data['payment_method'] = $this->request->getPost('payment_method'); + if ($id) { $result = $this->expense_model->updateExpense($id, $data); diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index bb2c0fdc..22ff4c48 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,10 +717,6 @@ if (!empty($getlogpodtl)) { });
@@ -764,12 +755,12 @@ if (!empty($getlogpodtl)) {
- -

- -

- - Back + +

+ +

+ + Back
@@ -779,2009 +770,2043 @@ 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); + ?> +
+
+
+
+
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - + 'editotherreference', 'value' => set_value('editotherreference', $OtherReferences), 'id' => 'editotherreference', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
-
- -
- - - '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]; + +
+ + '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 { - 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"; + } + ?> +
+
+
+
+
+
+
+
+
+ + -
-
+
+ + - - - - - - - - - + + + + + + + - - - \ No newline at end of file + }); + \ No newline at end of file diff --git a/app/Views/addEmployee.php b/app/Views/addEmployee.php index 64c07d9a..bfd19d4a 100644 --- a/app/Views/addEmployee.php +++ b/app/Views/addEmployee.php @@ -465,7 +465,7 @@ legend {
- Back + Back
diff --git a/app/Views/addSupplier.php b/app/Views/addSupplier.php index 16590348..d92f3f0c 100644 --- a/app/Views/addSupplier.php +++ b/app/Views/addSupplier.php @@ -46,7 +46,7 @@
- Back + Back
diff --git a/app/Views/addasset.php b/app/Views/addasset.php index 8228925b..67086ce0 100644 --- a/app/Views/addasset.php +++ b/app/Views/addasset.php @@ -10,7 +10,7 @@
- Back + Back
diff --git a/app/Views/addconfig.php b/app/Views/addconfig.php index 603ab023..45db9225 100644 --- a/app/Views/addconfig.php +++ b/app/Views/addconfig.php @@ -16,7 +16,7 @@
- Back + Back
- Back + Back
diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php index 9d688d81..c6f6634b 100644 --- a/app/Views/alterpurchaseorder.php +++ b/app/Views/alterpurchaseorder.php @@ -1,6 +1,7 @@ "NO", "value" => "0"), array("name" => "YES", "value" => "1") + array("name" => "NO", "value" => "0"), + array("name" => "YES", "value" => "1") ); $ReqType = ''; $CompanyAddress = ''; @@ -172,40 +173,40 @@ if (!empty($INRSYMBOL)) { $(function() { - $("#PODate").datepicker({ - // minDate : 'now', - // maxDate : 'now', - dateFormat: 'dd-mm-yy', - changeMonth: true, - changeYear: true, - yearRange: '-100:+0' - }); - $("#Deliverydt").datepicker({ - minDate: 'now', - dateFormat: 'dd-mm-yy', - changeMonth: true, - changeYear: true, - yearRange: '0:+10' - }); + // $("#PODate").datepicker({ + // // minDate : 'now', + // // maxDate : 'now', + // dateFormat: 'dd-mm-yy', + // changeMonth: true, + // changeYear: true, + // yearRange: '-100:+0' + // }); + // $("#Deliverydt").datepicker({ + // minDate: 'now', + // dateFormat: 'dd-mm-yy', + // changeMonth: true, + // changeYear: true, + // yearRange: '0:+10' + // }); - $("#Date1").datepicker({ - // minDate : 'now', - dateFormat: 'dd-mm-yy', - changeMonth: true, - changeYear: true, - yearRange: '0:+10' - }); + // $("#Date1").datepicker({ + // // minDate : 'now', + // dateFormat: 'dd-mm-yy', + // changeMonth: true, + // changeYear: true, + // yearRange: '0:+10' + // }); - $("#MRC").datepicker({ - // minDate : 'now', - dateFormat: 'dd-mm-yy', - changeMonth: true, - changeYear: true, - yearRange: '0:+10' - }); + // $("#MRC").datepicker({ + // // minDate : 'now', + // dateFormat: 'dd-mm-yy', + // changeMonth: true, + // changeYear: true, + // yearRange: '0:+10' + // }); var SelectedMaterialList = { Mat: [] @@ -1910,10 +1911,11 @@ if (!empty($INRSYMBOL)) { $("#EditRevenueMaterialCode").select2(); $("#MaterialCode").select2(); $("#ServiceMaterialCode").select2(); + $("#emergency_itemcode").select2(); + }); - $("#emergency_itemcode").select2(); @@ -2020,141 +2022,272 @@ if (!empty($INRSYMBOL)) { .num { text-align: right; } +<<<<<<< HEAD + .header-container { - display: flex; - justify-content: space-between; - align-items: center; - padding: 25px; - } + display: flex; + justify-content: space-between; + align-items: center; + padding: 25px; + } - .header-container h2 { - flex: 1; - text-align: center; - margin: 0; - } + .header-container h2 { + flex: 1; + text-align: center; + margin: 0; + } - .centered { - display: flex; - /* justify-content: center; */ - align-items: center; - height: 10vh; - } + .centered { + display: flex; + /* justify-content: center; */ + align-items: center; + height: 10vh; + } - .centered label, - .centered input { - margin: 0 5px; - } - - .mandatory { - color: red; - text-align: right; - background-color: white; - } + .centered label, + .centered input { + margin: 0 5px; + } -
- 'form-label-left CreatealterPO ', 'name' => 'CreatealterPO', 'id' => 'CreatealterPO'); - - echo form_open(base_url() . '/purchaseorder/addalterPO/', $attributes); ?> - -
-
-
-
-

Emergency Purchase Order

-
-
+ +
+
+ +
+
-
-
- - 'Select Request Type'); +
+
+

+
+
+
+ + +
+
+
+
+ 'form-label-left CreatealterPO ', 'name' => 'CreatealterPO', 'id' => 'CreatealterPO'); + echo form_open(base_url() . '/purchaseorder/addalterPO/', $attributes); + ?> - if (!empty($RequestType)) { +
+
+ + 'Select Request Type'); - foreach ($RequestType as $RID) : - if ($RID->ConfigValue == "SERVICE" || $RID->ConfigValue == "REVENUE") { - $options[$RID->ConfigValue] = $RID->ConfigValue; - } - endforeach; - } + if (!empty($RequestType)) { - echo form_dropdown('RequestType', $options, set_value('ConfigValue'), 'id="purpose"', 'class = "form-control select2"', 'required="true"'); + foreach ($RequestType as $RID) : + if ($RID->ConfigValue == "SERVICE" || $RID->ConfigValue == "REVENUE") { + $options[$RID->ConfigValue] = $RID->ConfigValue; + } + endforeach; + } - ?> + echo form_dropdown('RequestType', $options, set_value('ConfigValue'), 'id="purpose"', 'class = "form-control select2"', 'required="true"'); -
-
- -
+ ?> +
+
+ 'POType', 'value' => set_value('POType', $ReqType), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); echo form_input($data); ?>
-
-
- -
- 'Select Supplier'); - //print_r( $options); +
+ +
+ 'Select Supplier'); + //print_r( $options); - if (!empty($Suplist)) { - foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; - endforeach; - } + if (!empty($Suplist)) { + foreach ($Suplist as $SID) : + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; + endforeach; + } - echo form_dropdown('drpSupplier', $options, set_value('drpSupplier'), 'id="drpSupplier"', 'required="true"', 'class="form-control select2"'); + echo form_dropdown('drpSupplier', $options, set_value('drpSupplier'), 'id="drpSupplier"', 'required="true"', 'class="form-control select2"'); - ?> + ?> +
-
-
- -
+
+ 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); echo Form_textarea($data); ?>
-
-
+
+
-
+ +>>>>>>> b5e10f55a3448c644114ed6e55752b30684440f3 - - + + \ No newline at end of file diff --git a/app/Views/createPOfromRequistion.php b/app/Views/createPOfromRequistion.php index b467baf5..0bfda90c 100644 --- a/app/Views/createPOfromRequistion.php +++ b/app/Views/createPOfromRequistion.php @@ -1,14 +1,16 @@ + .Date-filter-form { + display: flex; + align-items: center; + gap: 10px; + /* Adjust the gap as needed */ + } + + .Date-filter-form input, + .Date-filter-form button { + padding: 5px; + font-size: 14px; + } + + .Date-filter-form button { + background-color: #007bff; + color: white; + border: none; + cursor: pointer; + } + + .Date-filter-form button:hover { + background-color: #0056b3; + } + + .icon-button { + background: none; + border: none; + cursor: pointer; + color: #007bff; + font-size: 18px; + } + + .icon-button:hover { + color: #0056b3; + } +
-
+
'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO', 'method' => 'post', 'role' => 'form'); echo form_open(base_url() . 'purchaseOrder', $attributes); ?> - -
- + + +
+ + + + + +
-
-
-

Create Purchase Order from Requistion

-
-
-
+
+
+

Create Purchase Order from Requistion

+
+
+
- getFlashdata('error'); - if ($error) { - ?> -
- - getFlashdata('error'); ?> -
+ getFlashdata('error'); + if ($error) { + ?> +
+ + getFlashdata('error'); ?> +
getFlashdata('success'); if ($success) { ?> -
- +
+ getFlashdata('success'); ?> -
+
listErrors('
', '
'); - ?> + ?>
getFlashdata('listErrors'); if ($listErrors) { ?> -
-
-
- +
+
+
+ getFlashdata('listErrors'); ?> +
-

-

- - - - Create Purchase Order - - -
+
+ + + + Create Purchase Order + + +

- -
- - - - - - +
+ + + + + + + + + + +
+
+
- - -
- -
- @@ -291,9 +343,9 @@ span.highlight { - - - + + + @@ -305,85 +357,179 @@ span.highlight { $index = 1; foreach ($ReqList as $record) { ?> - - - - - - - - - - - - - - + + + + + + + + + + + + + +
Requistion Number Requistion Type Requested ByTot. No. Of Line ItemsPo Created Line ItemsPartial PO Created Line ItemsTot Line ItemsPo Line ItemsPartial PO Line Items New Line Items Status Department
  - ReqDate); - $RequestedDate = $dt->format('d-m-Y'); - echo $RequestedDate; - ?> - ReqNo; ?> ReqType; ?>FirstName; ?>TotalNoofLineItems; ?>PolineItems; ?>PartilallyLineItems; ?>newLineItem; ?>StatusName; ?>DepartmentName; ?>Designation; ?>
  + ReqDate); + $RequestedDate = $dt->format('d-m-Y'); + echo $RequestedDate; + ?> + ReqNo; ?> ReqType; ?>FirstName; ?>TotalNoofLineItems; ?>PolineItems; ?>PartilallyLineItems; ?>newLineItem; ?>StatusName; ?>DepartmentName; ?>Designation; ?>
- +
-
-
+
+
+ + + + + - - \ No newline at end of file diff --git a/app/Views/editCapitalAmendPO.php b/app/Views/editCapitalAmendPO.php index b41835eb..09520a66 100644 --- a/app/Views/editCapitalAmendPO.php +++ b/app/Views/editCapitalAmendPO.php @@ -234,11 +234,6 @@ margin: 0 5px; } - .mandatory { - color: red; - text-align: right; - background-color: white; - } .content-wrapper { min-height: 600px ! important; @@ -456,7 +451,7 @@
-
+

Amended Capital Purchase Order-

Back @@ -467,8 +462,8 @@
-
-
+
+
-
+
@@ -495,7 +490,7 @@ ?>
-
+
-
+
-
-
+
+
@@ -545,7 +540,7 @@
-
+
Select Delivery By
@@ -561,7 +556,7 @@
-
+
+ + +
+
+ + + + - - - - - - - - - @@ -1832,31 +1834,10 @@ if (!empty($getlogpodtl)) { }
@@ -1883,12 +1858,12 @@ if (!empty($getlogpodtl)) {
- -

- -

- - Back + +

+ +

+ + Back
@@ -1898,2094 +1873,741 @@ if (!empty($getlogpodtl)) {
- 'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO'); - echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); + echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> +
- -
+
+
+ + 'Selected Requisition Numbers'); + if (!empty($ReqList)) { + foreach ($ReqList as $SID) : -
-
-
- - 'Selected Requisition Numbers'); - if (!empty($ReqList)) { - foreach ($ReqList as $SID) : + $options[$SID->ReqNo] = $SID->ReqNo; + //$ReqType = $SID->ReqType; + endforeach; + } + echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"', 'height="400px"'); + ?> +
+
+ +
- $options[$SID->ReqNo] = $SID->ReqNo; - //$ReqType = $SID->ReqType; - endforeach; - } - echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"', 'height="400px"'); - ?> -
-
- -
+ 'POType', 'value' => set_value('POType', REVENUE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ + 'Select Supplier'); + //print_r( $options); - 'POType', 'value' => set_value('POType', REVENUE), '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); - ?> -
-
-
-
-
-
-
-
- - Select Tax Range
-
- - 'Range', 'value' => '0', 'checked' => ('0' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Local', 'onchange' => 'SetVatorCST();')); ?> - - 'Range', 'value' => '1', 'checked' => ('1' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Inter_state', 'onchange' => 'SetVatorCST();')); ?> - -
-
-
-
- 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', $supplierref), 'id' => 'editsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); - echo form_input($data); - ?> -
- -
-
- -
- - 'editsupplierofferno', 'value' => set_value('editsupplierofferno', $suppofferno), 'id' => 'editsupplierofferno', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
-
-
-
-
- - -
- - 'editotherreference', 'value' => set_value('editotherreference', $otherref), 'id' => 'editotherreference', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
- -
- - 'Select Work Status'); - - - if (!empty($PoTypeOptions)) { - - foreach ($PoTypeOptions as $POpt) : - - if ($revenuesubtype == $POpt->ConfigValue) { - $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + if (!empty($Suplist)) { + foreach ($Suplist as $SID) : + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; + endforeach; } - endforeach; - foreach ($PoTypeOptions as $POpt1) : + 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); + ?> +
+
+
+
+
+
- if ($revenuesubtype != $POpt1->ConfigValue) { - $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; + Select Tax Range
+
+ + 'Range', 'value' => '0', 'checked' => ('0' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Local', 'onchange' => 'SetVatorCST();')); ?> + + 'Range', 'value' => '1', 'checked' => ('1' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Inter_state', 'onchange' => 'SetVatorCST();')); ?> + +
+
+
+
+ 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', $supplierref), 'id' => 'editsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); + echo form_input($data); + ?> +
+ +
+
+ +
+ + 'editsupplierofferno', 'value' => set_value('editsupplierofferno', $suppofferno), 'id' => 'editsupplierofferno', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+
+
+ + +
+ + 'editotherreference', 'value' => set_value('editotherreference', $otherref), 'id' => 'editotherreference', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+ + + 'Select Work Status'); + + + if (!empty($PoTypeOptions)) { + + foreach ($PoTypeOptions as $POpt) : + + if ($revenuesubtype == $POpt->ConfigValue) { + $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + } + + endforeach; + foreach ($PoTypeOptions as $POpt1) : + + if ($revenuesubtype != $POpt1->ConfigValue) { + $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; + } + + endforeach; } - endforeach; - } + echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions" required="true" class="form-control"'); - echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions"', 'required="true"', 'class="form-control select2'); - ?> + ?> -
-
-
- - - PaymentID] = $pay->PaymentTerms; - - endforeach; - } - echo form_dropdown('PaymentTerms', $options6, set_value('PaymentTerms', $Terms), 'id="PaymentTerms"', 'required="true"', 'class="form-control select2'); - ?> - - - -
- -
-
-
-
-
- - 'Yes', '0' => 'No'); - echo form_dropdown('insurancestatus', $optionsnew, set_value('insurancestatus'), 'id="insurancestatus"', 'required="true"', 'class="form-control select2'); - ?> -
-
- -
- 'InsuranceNumber', 'InsuranceNumber' => set_value('InsuranceNumber', $insurenceno), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); - echo form_input($data); - ?> -
-
-
- - - -
-
-
-
-
- - - -