mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-02-16 16:28:41 +00:00
fix login bugs
This commit is contained in:
parent
293a3e060a
commit
2adbdc8765
|
|
@ -154,6 +154,16 @@ final class ApiBillController extends Controller
|
||||||
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Bill', 'Bill successfully created.', $bill);
|
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Bill', 'Bill successfully created.', $bill);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new database entry for a Bill object and update its bill number
|
||||||
|
*
|
||||||
|
* @param Bill $bill The Bill object to create a database entry for and update its bill number
|
||||||
|
* @param RequestAbstract $request The request object that contains the header account and origin
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function createBillDatabaseEntry(Bill $bill, RequestAbstract $request) : void
|
public function createBillDatabaseEntry(Bill $bill, RequestAbstract $request) : void
|
||||||
{
|
{
|
||||||
$this->createModel($request->header->account, $bill, BillMapper::class, 'bill', $request->getOrigin());
|
$this->createModel($request->header->account, $bill, BillMapper::class, 'bill', $request->getOrigin());
|
||||||
|
|
@ -163,6 +173,22 @@ final class ApiBillController extends Controller
|
||||||
$this->updateModel($request->header->account, $bill, $new, BillMapper::class, 'bill', $request->getOrigin());
|
$this->updateModel($request->header->account, $bill, $new, BillMapper::class, 'bill', $request->getOrigin());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a base Bill object with default values
|
||||||
|
*
|
||||||
|
* @param Client $client The client object for whom the bill is being created
|
||||||
|
* @param RequestAbstract $request The request object that contains the header account
|
||||||
|
*
|
||||||
|
* @return Bill The new Bill object with default values
|
||||||
|
*
|
||||||
|
* @todo Validate VAT before creation
|
||||||
|
* @todo Set the correct date of payment
|
||||||
|
* @todo Use bill and shipping address instead of main address if available
|
||||||
|
* @todo Implement allowed invoice languages and a default invoice language if none match
|
||||||
|
* @todo Implement client invoice language (allowing for different invoice languages than invoice address)
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function createBaseBill(Client $client, RequestAbstract $request) : Bill
|
public function createBaseBill(Client $client, RequestAbstract $request) : Bill
|
||||||
{
|
{
|
||||||
// @todo: validate vat before creation
|
// @todo: validate vat before creation
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,16 @@ final class ApiTaxController extends Controller
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the client's tax code based on their country and tax office address
|
||||||
|
*
|
||||||
|
* @param Client $client The client to get the tax code for
|
||||||
|
* @param Address $taxOfficeAddress The tax office address used to determine the tax code
|
||||||
|
*
|
||||||
|
* @return ClientAttributeValue The client's tax code
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getClientTaxCode(Client $client, Address $taxOfficeAddress) : ClientAttributeValue
|
public function getClientTaxCode(Client $client, Address $taxOfficeAddress) : ClientAttributeValue
|
||||||
{
|
{
|
||||||
/** @var \Modules\ClientManagement\Models\ClientAttributeType $codes */
|
/** @var \Modules\ClientManagement\Models\ClientAttributeType $codes */
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ use Modules\Billing\Models\BillMapper;
|
||||||
use Modules\Billing\Models\BillTypeMapper;
|
use Modules\Billing\Models\BillTypeMapper;
|
||||||
use Modules\Billing\Models\NullBillType;
|
use Modules\Billing\Models\NullBillType;
|
||||||
use Modules\Billing\Models\SettingsEnum;
|
use Modules\Billing\Models\SettingsEnum;
|
||||||
|
use Modules\Payment\Models\PaymentType;
|
||||||
use Modules\SupplierManagement\Models\NullSupplier;
|
use Modules\SupplierManagement\Models\NullSupplier;
|
||||||
use Modules\SupplierManagement\Models\Supplier;
|
use Modules\SupplierManagement\Models\Supplier;
|
||||||
use Modules\SupplierManagement\Models\SupplierMapper;
|
use Modules\SupplierManagement\Models\SupplierMapper;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user