mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-02-07 20:18: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
|
||||
// However, It should be possible to remove UNUSED default values
|
||||
// either here or other function?
|
||||
if (!empty($val = $this->validateAttributeValueDelete($request))) {
|
||||
$response->header->status = RequestStatusCode::R_400;
|
||||
$this->createInvalidDeleteResponse($request, $response, $val);
|
||||
// if (!empty($val = $this->validateAttributeValueDelete($request))) {
|
||||
// $response->header->status = RequestStatusCode::R_400;
|
||||
// $this->createInvalidDeleteResponse($request, $response, $val);
|
||||
|
||||
return;
|
||||
}
|
||||
// return;
|
||||
// }
|
||||
|
||||
/** @var \Modules\Billing\Models\BillAttributeValue $billAttributeValue */
|
||||
$billAttributeValue = BillAttributeValueMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
||||
$this->deleteModel($request->header->account, $billAttributeValue, BillAttributeValueMapper::class, 'bill_attribute_value', $request->getOrigin());
|
||||
$this->createStandardDeleteResponse($request, $response, $billAttributeValue);
|
||||
// /** @var \Modules\Billing\Models\BillAttributeValue $billAttributeValue */
|
||||
// $billAttributeValue = BillAttributeValueMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
||||
// $this->deleteModel($request->header->account, $billAttributeValue, BillAttributeValueMapper::class, 'bill_attribute_value', $request->getOrigin());
|
||||
// $this->createStandardDeleteResponse($request, $response, $billAttributeValue);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -726,9 +726,11 @@ final class ApiBillController extends Controller
|
|||
$element->bill = new NullBill($bill->id);
|
||||
|
||||
// discounts
|
||||
// @todo: implement a addDiscount function
|
||||
/*
|
||||
if ($request->getData('discount_percentage') !== null) {
|
||||
// @todo: implement a addDiscount function
|
||||
}
|
||||
*/
|
||||
|
||||
return $element;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ final class ApiPriceController extends Controller
|
|||
private function validatePriceCreate(RequestAbstract $request) : array
|
||||
{
|
||||
$val = [];
|
||||
if (false) {
|
||||
if (($val['name'] = !$request->hasData('name'))) {
|
||||
return $val;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user