mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-02-17 08:48:40 +00:00
fix tests
This commit is contained in:
parent
964afbd0e5
commit
57a8593457
|
|
@ -451,17 +451,17 @@ final class ApiAttributeController extends Controller
|
||||||
// @todo: I don't think values can be deleted? Only Attributes
|
// @todo: I don't think values can be deleted? Only Attributes
|
||||||
// However, It should be possible to remove UNUSED default values
|
// However, It should be possible to remove UNUSED default values
|
||||||
// either here or other function?
|
// either here or other function?
|
||||||
if (!empty($val = $this->validateAttributeValueDelete($request))) {
|
// if (!empty($val = $this->validateAttributeValueDelete($request))) {
|
||||||
$response->header->status = RequestStatusCode::R_400;
|
// $response->header->status = RequestStatusCode::R_400;
|
||||||
$this->createInvalidDeleteResponse($request, $response, $val);
|
// $this->createInvalidDeleteResponse($request, $response, $val);
|
||||||
|
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/** @var \Modules\Billing\Models\BillAttributeValue $billAttributeValue */
|
// /** @var \Modules\Billing\Models\BillAttributeValue $billAttributeValue */
|
||||||
$billAttributeValue = BillAttributeValueMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
// $billAttributeValue = BillAttributeValueMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
||||||
$this->deleteModel($request->header->account, $billAttributeValue, BillAttributeValueMapper::class, 'bill_attribute_value', $request->getOrigin());
|
// $this->deleteModel($request->header->account, $billAttributeValue, BillAttributeValueMapper::class, 'bill_attribute_value', $request->getOrigin());
|
||||||
$this->createStandardDeleteResponse($request, $response, $billAttributeValue);
|
// $this->createStandardDeleteResponse($request, $response, $billAttributeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -726,9 +726,11 @@ final class ApiBillController extends Controller
|
||||||
$element->bill = new NullBill($bill->id);
|
$element->bill = new NullBill($bill->id);
|
||||||
|
|
||||||
// discounts
|
// discounts
|
||||||
|
// @todo: implement a addDiscount function
|
||||||
|
/*
|
||||||
if ($request->getData('discount_percentage') !== null) {
|
if ($request->getData('discount_percentage') !== null) {
|
||||||
// @todo: implement a addDiscount function
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return $element;
|
return $element;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ final class ApiPriceController extends Controller
|
||||||
private function validatePriceCreate(RequestAbstract $request) : array
|
private function validatePriceCreate(RequestAbstract $request) : array
|
||||||
{
|
{
|
||||||
$val = [];
|
$val = [];
|
||||||
if (false) {
|
if (($val['name'] = !$request->hasData('name'))) {
|
||||||
return $val;
|
return $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user