mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 04:24:00 +00:00
invoice-backend
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ class UpdateFreightForwarderLogic
|
||||
public function execute(String $forwarderId, Request $request){
|
||||
|
||||
try{
|
||||
$object = new FreightForwarderObject(null, null, null, null, null, null,null, null, $request->input('shipping_rate'), $request->input('overdue_days'), $request->input('markup_percentage'));
|
||||
$object = new FreightForwarderObject(null, null, null, null, null, null,null, null, $request->input('shipping_rate'), $request->input('overdue_days'), $request->input('markup_percentage'), $request->input('minimum_cbm'));
|
||||
return $this->updatesFreightForwarder->execute($forwarderId, $object);
|
||||
return new JsonResponse([],HttpStatus::REQUEST_ACCEPTED);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class CustomerRelationObject
|
||||
/** @var float|null */
|
||||
private $customer_rate;
|
||||
|
||||
/** @var float|null */
|
||||
/** @var boolean|null */
|
||||
private $wave;
|
||||
|
||||
/**
|
||||
@@ -22,9 +22,9 @@ class CustomerRelationObject
|
||||
* @param int|null $forwarderId
|
||||
* @param int|null $companyId
|
||||
* @param float|null $customer_rate
|
||||
* @param float|null $wave
|
||||
* @param bool|null $wave
|
||||
*/
|
||||
public function __construct(?int $forwarderId = null, ?int $companyId = null, ?float $customer_rate = null, ?float $wave = null)
|
||||
public function __construct(?int $forwarderId = null, ?int $companyId = null, ?float $customer_rate = null, ?bool $wave = null)
|
||||
{
|
||||
$this->forwarderId = $forwarderId;
|
||||
$this->companyId = $companyId;
|
||||
@@ -57,9 +57,9 @@ class CustomerRelationObject
|
||||
}
|
||||
|
||||
/**
|
||||
* @return float|null
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getWave(): ?float
|
||||
public function getWave(): ?bool
|
||||
{
|
||||
return $this->wave;
|
||||
}
|
||||
|
||||
+18
-1
@@ -37,6 +37,9 @@ class FreightForwarderObject
|
||||
/** @var float|null */
|
||||
private $markup_percentage;
|
||||
|
||||
/** @var float|null */
|
||||
private $minimum_cbm;
|
||||
|
||||
/**
|
||||
* FreightForwarderObject constructor.
|
||||
* @param null|string $name
|
||||
@@ -50,8 +53,9 @@ class FreightForwarderObject
|
||||
* @param float|null $shipping_rate
|
||||
* @param int|null $overdue_days
|
||||
* @param float|null $markup_percentage
|
||||
* @param float|null $minimum_cbm
|
||||
*/
|
||||
public function __construct(?string $name = null, ?string $email = null, ?string $street_one = null, ?string $street_two = null, ?string $city = null, ?string $state = null, ?string $post_code = null, ?string $country = null, ?float $shipping_rate = null, ?int $overdue_days = null, ?float $markup_percentage = null)
|
||||
public function __construct(?string $name = null, ?string $email = null, ?string $street_one = null, ?string $street_two = null, ?string $city = null, ?string $state = null, ?string $post_code = null, ?string $country = null, ?float $shipping_rate = null, ?int $overdue_days = null, ?float $markup_percentage = null, ?float $minimum_cbm = null)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->email = $email;
|
||||
@@ -64,6 +68,7 @@ class FreightForwarderObject
|
||||
$this->shipping_rate = $shipping_rate;
|
||||
$this->overdue_days = $overdue_days;
|
||||
$this->markup_percentage = $markup_percentage;
|
||||
$this->minimum_cbm = $minimum_cbm;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,4 +159,16 @@ class FreightForwarderObject
|
||||
return $this->markup_percentage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return float|null
|
||||
*/
|
||||
public function getMinimumCbm(): ?float
|
||||
{
|
||||
return $this->minimum_cbm;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace App\Classes\Modules\FreightForwarder\DataTransferObjects;
|
||||
|
||||
class ServiceObject
|
||||
{
|
||||
/** @var String|null */
|
||||
/** @var int|null */
|
||||
private $type;
|
||||
|
||||
/** @var int|null */
|
||||
@@ -28,13 +28,13 @@ class ServiceObject
|
||||
|
||||
/**
|
||||
* ServiceObject constructor.
|
||||
* @param null|String $type
|
||||
* @param null|int $type
|
||||
* @param int|null $forwarderId
|
||||
* @param null|String $name
|
||||
* @param null|String $description
|
||||
* @param float|null $cost
|
||||
*/
|
||||
public function __construct(?string $type = null, ?int $forwarderId = null, ?string $name = null, ?string $description = null, ?float $cost = null)
|
||||
public function __construct(?int $type = null, ?int $forwarderId = null, ?string $name = null, ?string $description = null, ?float $cost = null)
|
||||
{
|
||||
$this->type = $type;
|
||||
$this->forwarderId = $forwarderId;
|
||||
@@ -44,9 +44,9 @@ class ServiceObject
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null|String
|
||||
* @return null|int
|
||||
*/
|
||||
public function getType(): ?string
|
||||
public function getType(): ?int
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
@@ -83,4 +83,7 @@ class ServiceObject
|
||||
return $this->cost;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -30,6 +30,7 @@ class UpdatesFreightForwarder
|
||||
$repository->shipping_rate = $forwarderObject->getShippingRate();
|
||||
$repository->overdue_days = $forwarderObject->getOverdueDays();
|
||||
$repository->markup_percentage = $forwarderObject->getMarkupPercentage();
|
||||
$repository->minimum_cbm = $forwarderObject->getMinimumCbm();
|
||||
$repository->save();
|
||||
return new JsonResponse([],HttpStatus::OK);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class UpdatesServiceFees
|
||||
}
|
||||
|
||||
|
||||
public function execute(String $serviceId, ServiceObject $serviceObject){
|
||||
public function execute(?String $serviceId = null, ServiceObject $serviceObject){
|
||||
try{
|
||||
$this->repository->updateOrCreate(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user