mirror of
https://github.com/Karaka-Management/oms-Shop.git
synced 2026-01-11 10:38:40 +00:00
bug fixes
This commit is contained in:
parent
aa293d90ec
commit
bd291f26aa
|
|
@ -15,7 +15,6 @@ declare(strict_types=1);
|
||||||
namespace Modules\Shop\Controller;
|
namespace Modules\Shop\Controller;
|
||||||
|
|
||||||
use Modules\Admin\Models\AccountMapper;
|
use Modules\Admin\Models\AccountMapper;
|
||||||
use Modules\Admin\Models\NullAddress;
|
|
||||||
use Modules\Billing\Models\BillMapper;
|
use Modules\Billing\Models\BillMapper;
|
||||||
use Modules\Billing\Models\BillStatus;
|
use Modules\Billing\Models\BillStatus;
|
||||||
use Modules\ClientManagement\Models\ClientMapper;
|
use Modules\ClientManagement\Models\ClientMapper;
|
||||||
|
|
@ -30,6 +29,7 @@ use phpOMS\Message\Http\HttpResponse;
|
||||||
use phpOMS\Message\Http\RequestStatusCode;
|
use phpOMS\Message\Http\RequestStatusCode;
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
use phpOMS\Message\ResponseAbstract;
|
use phpOMS\Message\ResponseAbstract;
|
||||||
|
use phpOMS\Stdlib\Base\NullAddress;
|
||||||
use phpOMS\System\MimeType;
|
use phpOMS\System\MimeType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -79,13 +79,13 @@ final class ApiController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle private files
|
// Handle private files
|
||||||
// @todo: this is another example where it would be useful to have clients and items as models in the bill and bill element
|
// @todo this is another example where it would be useful to have clients and items as models in the bill and bill element
|
||||||
/** @var \Modules\ClientManagement\Models\Client $client */
|
/** @var \Modules\ClientManagement\Models\Client $client */
|
||||||
$client = ClientMapper::get()
|
$client = ClientMapper::get()
|
||||||
->where('account', $request->header->account)
|
->where('account', $request->header->account)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
// @todo: only for sales invoice, currently also for offers
|
// @todo only for sales invoice, currently also for offers
|
||||||
/** @var \Modules\Billing\Models\Bill[] $bills */
|
/** @var \Modules\Billing\Models\Bill[] $bills */
|
||||||
$bills = BillMapper::getAll()
|
$bills = BillMapper::getAll()
|
||||||
->with('elements')
|
->with('elements')
|
||||||
|
|
@ -326,7 +326,7 @@ final class ApiController extends Controller
|
||||||
->where('id', $request->header->account)
|
->where('id', $request->header->account)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
// @todo: what if the primary address is not in position 1?
|
// @todo what if the primary address is not in position 1?
|
||||||
$address = \reset($account->locations);
|
$address = \reset($account->locations);
|
||||||
$address = $address === false ? new NullAddress() : $address;
|
$address = $address === false ? new NullAddress() : $address;
|
||||||
|
|
||||||
|
|
@ -391,7 +391,7 @@ final class ApiController extends Controller
|
||||||
/** @var \Modules\ItemManagement\Models\Item $item */
|
/** @var \Modules\ItemManagement\Models\Item $item */
|
||||||
$item = $itemMapper->execute();
|
$item = $itemMapper->execute();
|
||||||
|
|
||||||
// @todo: consider to first create an offer = cart and only when paid turn it into an invoice. This way it's also easy to analyse the conversion rate.
|
// @todo consider to first create an offer = cart and only when paid turn it into an invoice. This way it's also easy to analyse the conversion rate.
|
||||||
|
|
||||||
$billElement = $this->app->moduleManager->get('Billing', 'ApiBill')->createBaseBillElement($client, $item, $bill, $request);
|
$billElement = $this->app->moduleManager->get('Billing', 'ApiBill')->createBaseBillElement($client, $item, $bill, $request);
|
||||||
$bill->addElement($billElement);
|
$bill->addElement($billElement);
|
||||||
|
|
|
||||||
2
ICAL.txt
2
ICAL.txt
|
|
@ -1,6 +1,6 @@
|
||||||
# Individual Contributor License Agreement ("CLA") 1.0
|
# Individual Contributor License Agreement ("CLA") 1.0
|
||||||
|
|
||||||
Thank you for your interest in Karaka-Management (the "Company"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Company must provide a Contributor License Agreement ("CLA") on file that has been made available to each Contributor. This license is for your protection as a Contributor as well as the protection of the Company and its users; it does not change your rights to use your own Contributions for any other purpose.
|
Thank you for your interest in Jingga e. K. (the "Company"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Company must provide a Contributor License Agreement ("CLA") on file that has been made available to each Contributor. This license is for your protection as a Contributor as well as the protection of the Company and its users; it does not change your rights to use your own Contributions for any other purpose.
|
||||||
|
|
||||||
By contributing to the Company You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Company. In return, the Company shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its bylaws in effect at the time of the Contribution. Except for the license granted herein to the Company and recipients of software distributed by the Company, You reserve all right, title, and interest in and to Your Contributions.
|
By contributing to the Company You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Company. In return, the Company shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its bylaws in effect at the time of the Contribution. Except for the license granted herein to the Company and recipients of software distributed by the Company, You reserve all right, title, and interest in and to Your Contributions.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user