mirror of
https://github.com/Karaka-Management/oms-ClientManagement.git
synced 2026-02-18 17:58:40 +00:00
bug fixes / dbmapper fixes
This commit is contained in:
parent
fa7e92a8b5
commit
4c10113699
|
|
@ -14,10 +14,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\ClientManagement\Controller;
|
||||
|
||||
use Modules\Billing\Models\BillTypeL11n;
|
||||
use Modules\Billing\Models\SalesBillMapper;
|
||||
use Modules\ClientManagement\Models\ClientMapper;
|
||||
use Modules\Media\Models\Media;
|
||||
use phpOMS\Asset\AssetType;
|
||||
use phpOMS\Contract\RenderableInterface;
|
||||
use phpOMS\DataStorage\Database\Query\OrderType;
|
||||
|
|
@ -120,8 +118,8 @@ final class BackendController extends Controller
|
|||
->with('profile/account')
|
||||
->with('contactElements')
|
||||
->with('mainAddress')
|
||||
->with('files')->limit(5, 'files')->sort('files', OrderType::DESC)
|
||||
->with('notes')->limit(5, 'files')->sort('notes', OrderType::DESC)
|
||||
->with('files')->limit(5, 'files')->sort('files/id', OrderType::DESC)
|
||||
->with('notes')->limit(5, 'files')->sort('notes/id', OrderType::DESC)
|
||||
->where('id', (int) $request->getData('id'))
|
||||
->execute();
|
||||
|
||||
|
|
@ -132,7 +130,16 @@ final class BackendController extends Controller
|
|||
$ytd = SalesBillMapper::getSalesByClientId($client->getId(), new SmartDateTime('Y-01-01'), new SmartDateTime('now'));
|
||||
$mtd = SalesBillMapper::getSalesByClientId($client->getId(), new SmartDateTime('Y-m-01'), new SmartDateTime('now'));
|
||||
$lastOrder = SalesBillMapper::getLastOrderDateByClientId($client->getId());
|
||||
$newestInvoices = SalesBillMapper::getAll()->with('client')->where('client', $client->getId())->sort('id', OrderType::DESC)->limit(5)->execute();
|
||||
$newestInvoices = SalesBillMapper::getAll()
|
||||
->with('type')
|
||||
->with('type/l11n')
|
||||
->with('client')
|
||||
->where('client', $client->getId())
|
||||
->where('type/l11n/language', $response->getLanguage())
|
||||
->sort('id', OrderType::DESC)
|
||||
->limit(5)
|
||||
->execute();
|
||||
|
||||
$monthlySalesCosts = SalesBillMapper::getClientMonthlySalesCosts($client->getId(), (new SmartDateTime('now'))->createModify(-1), new SmartDateTime('now'));
|
||||
$items = SalesBillMapper::getClientItem($client->getId(), (new SmartDateTime('now'))->createModify(-1), new SmartDateTime('now'));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user