From b08f47b8df0b6ecbf3210055ecda3314cc7bf1e9 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Mon, 19 Jun 2017 16:50:12 +0530 Subject: [PATCH] done revenue and service Po schedule options --- application/config/constants.php | 3 + application/controllers/purchaseorder.php | 14 +- .../controllers/servicepurchaseorder.php | 14 +- application/logs/log-2017-06-19.php | 7 + application/views/capitalpurchaseorder.php | 1007 ++++++++++++++--- application/views/editimportpo.php | 0 application/views/importpo.php | 0 application/views/poapproval_view.php | 0 application/views/porelease_view.php | 0 application/views/purchaseorder.php | 115 +- application/views/servicePurchaseorder.php | 68 +- 11 files changed, 1040 insertions(+), 188 deletions(-) create mode 100644 application/logs/log-2017-06-19.php mode change 100644 => 100755 application/views/editimportpo.php mode change 100644 => 100755 application/views/importpo.php mode change 100644 => 100755 application/views/poapproval_view.php mode change 100644 => 100755 application/views/porelease_view.php diff --git a/application/config/constants.php b/application/config/constants.php index 7835550e..810566da 100755 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -173,6 +173,9 @@ define('PURCHASE_RATE', 'txtbasicinrprice/txt define('CUSTOMDUTY_EXP', 'txtgrossexp/txtCtablequantity'); define('RMC_CAL', 'txtpurchaserate+txtcustomdutyexp'); define('CALCULATE_TOTAL', '(txtrmc*quantity)+basicprice'); +/* Capital Po Calculations */ +define('Capital_Landing_Charge', 'basicPrice*(landCharge/100)'); +define('Capital_Highseas_Charge', '(basicPrice+afterLandingCharge)*(highSeas/100)'); diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index f8ae07d0..9423ebe3 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -500,6 +500,15 @@ class purchaseorder extends BaseController $DeliveryAddr = $this->input->post('DeliveryAddr'); $dt = $this->input->post('Deliverydt'); $Deliverydt = $this->getDateformat($dt); +$DeliveryOption = $this->input->post('DateRange'); + if($DeliveryOption==1){ + $Deliverydt = ''; + $DeliverySchedule = $this->input->post('Scheduleby'); + } + else{ + $Deliverydt = $this->getDateformat($dt); + $DeliverySchedule = ''; + } $POType = $this->input->post('POType'); $PoRange = $this->input->post('txtPoRange'); @@ -516,7 +525,8 @@ class purchaseorder extends BaseController $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $createddt = $dt->format('Y-m-d H:i:s'); // PO Master - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt ); + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt ); + $POMaster = $this->purchaseorder_model->addPOMaster($POList); @@ -1264,4 +1274,4 @@ public function importpoprint($PONO) } -?> \ No newline at end of file +?> diff --git a/application/controllers/servicepurchaseorder.php b/application/controllers/servicepurchaseorder.php index 8aa153ee..09d6ed91 100755 --- a/application/controllers/servicepurchaseorder.php +++ b/application/controllers/servicepurchaseorder.php @@ -69,6 +69,15 @@ class servicepurchaseorder extends BaseController $DeliveryAddr = $this->input->post('DeliveryAddr'); $dt = $this->input->post('Deliverydt'); $Deliverydt = $this->getDateformat($dt); +$DeliveryOption = $this->input->post('DateRange'); + if($DeliveryOption==1){ + $Deliverydt = ''; + $DeliverySchedule = $this->input->post('Scheduleby'); + } + else{ + $Deliverydt = $this->getDateformat($dt); + $DeliverySchedule = ''; + } $POType = $this->input->post('POType'); $SpcialInstruction = $this->input->post('txtSpcialInstruction'); @@ -84,7 +93,8 @@ class servicepurchaseorder extends BaseController $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $createddt = $dt->format('Y-m-d H:i:s'); // PO Master - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt ); + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,Delivery'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt ); + $POMaster = $this->purchaseorder_model->addPOMaster($POList); @@ -279,4 +289,4 @@ class servicepurchaseorder extends BaseController } } -?> \ No newline at end of file +?> diff --git a/application/logs/log-2017-06-19.php b/application/logs/log-2017-06-19.php new file mode 100644 index 00000000..e42e63d8 --- /dev/null +++ b/application/logs/log-2017-06-19.php @@ -0,0 +1,7 @@ + + +ERROR - 2017-06-19 13:18:05 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138 +ERROR - 2017-06-19 13:18:05 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139 +ERROR - 2017-06-19 13:18:05 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140 +ERROR - 2017-06-19 13:18:05 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186 +ERROR - 2017-06-19 13:18:05 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214 diff --git a/application/views/capitalpurchaseorder.php b/application/views/capitalpurchaseorder.php index f08e7c7b..144c788e 100755 --- a/application/views/capitalpurchaseorder.php +++ b/application/views/capitalpurchaseorder.php @@ -1,3 +1,30 @@ +format('Y-m-d'); +$MaxPoDate = ''; +$AvlAmount = 0; +if(!empty($MaxPODate)) +{ + foreach ($MaxPODate as $date) + { + $MaxPoDate = $date->PODate; + } +} +if(!empty($CompanyDetails)) +{ + foreach ($CompanyDetails as $Req) + { + $CompanyAddress = $Req->Address; + } +} +if(!empty($AvlBudAmt)) +{ + + $AvlAmount = $AvlBudAmt; + +} +?>