Browse Source

add promotion price

ifah
Siti Hajar Ibrahim 5 years ago
parent
commit
5d2155b240

+ 1
- 1
app/Http/Controllers/Controller.php View File



public function deleteTodayClaim() public function deleteTodayClaim()
{ {
$claim = DealerClaim::where('activated_my', '12/2020')->orWhere('activated_my','11/2020')->get();
$claim = DealerClaim::where('activated_my', '12/2020')->get();


foreach ($claim as $key => $c) { foreach ($claim as $key => $c) {
# code... # code...

+ 4
- 4
app/Http/Controllers/DS/DealerClaimController.php View File

$product = Product::where('speed', $formD->PackageDetail->name)->where('formT',$formD->type_application)->first(); $product = Product::where('speed', $formD->PackageDetail->name)->where('formT',$formD->type_application)->first();
$docket = Docket::where('work_order_id',$formD->WorkOrder->wo)->first(); $docket = Docket::where('work_order_id',$formD->WorkOrder->wo)->first();


// if($product->promotion_price != "0"){
// $price = (int)$product->promotion_price;
// } else {
if($product->promotion_price != "0"){
$price = (int)$product->promotion_price;
} else {
$price = (int)$product->retail_price; $price = (int)$product->retail_price;
// }
}


if(!empty($docket->docket_id)){ if(!empty($docket->docket_id)){
$subsData = [ $subsData = [

Loading…
Cancel
Save