mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-01-11 15:18:42 +00:00
update
This commit is contained in:
parent
c750e20fa3
commit
e79230dbf9
|
|
@ -43,7 +43,7 @@ use phpOMS\Views\View;
|
||||||
final class BackendController extends Controller
|
final class BackendController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -88,7 +88,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -146,7 +146,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -180,7 +180,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -201,7 +201,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -222,7 +222,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -269,7 +269,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -339,7 +339,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -368,7 +368,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -394,7 +394,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -415,7 +415,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -436,7 +436,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
@ -481,7 +481,7 @@ final class BackendController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing end-point for application behaviour.
|
* Routing end-point for application behavior.
|
||||||
*
|
*
|
||||||
* @param RequestAbstract $request Request
|
* @param RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace Modules\Billing\Models;
|
||||||
use phpOMS\Stdlib\Base\Enum;
|
use phpOMS\Stdlib\Base\Enum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Permision state enum.
|
* Permission category enum.
|
||||||
*
|
*
|
||||||
* @package Modules\Billing\Models
|
* @package Modules\Billing\Models
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
|
|
|
||||||
|
|
@ -118,22 +118,26 @@ final class SalesBillMapper extends BillMapper
|
||||||
/**
|
/**
|
||||||
* Placeholder
|
* Placeholder
|
||||||
*/
|
*/
|
||||||
public static function getAvgSalesPriceByItemId(int $id, \DateTime $start, \DateTime $end) : FloatInt
|
public static function getItemAvgSalesPrice(int $item, \DateTime $start, \DateTime $end) : FloatInt
|
||||||
{
|
{
|
||||||
|
$sql = <<<SQL
|
||||||
|
SELECT
|
||||||
|
SUM(billing_bill_element_single_netsalesprice) as net_sales,
|
||||||
|
COUNT(billing_bill_element_total_netsalesprice) as net_count
|
||||||
|
FROM billing_bill_element
|
||||||
|
JOIN billing_bill ON billing_bill_element.billing_bill_element_bill = billing_bill.billing_bill_id
|
||||||
|
WHERE
|
||||||
|
billing_bill_element_item = {$item}
|
||||||
|
AND billing_bill_performance_date >= '{$start->format('Y-m-d H:i:s')}'
|
||||||
|
AND billing_bill_performance_date <= '{$end->format('Y-m-d H:i:s')}';
|
||||||
|
SQL;
|
||||||
|
|
||||||
$query = new Builder(self::$db);
|
$query = new Builder(self::$db);
|
||||||
|
$result = $query->raw($sql)->execute()->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
/** @var array $result */
|
return isset($result[0]['net_count'])
|
||||||
$result = $query->select('SUM(billing_bill_element_single_netsalesprice)', 'COUNT(billing_bill_element_total_netsalesprice)')
|
? new FloatInt((int) ($result[0]['net_sales'] ?? 0) / ($result[0]['net_count']))
|
||||||
->from(self::TABLE)
|
: new FloatInt(0);
|
||||||
->leftJoin(BillElementMapper::TABLE)
|
|
||||||
->on(self::TABLE . '.billing_bill_id', '=', BillElementMapper::TABLE . '.billing_bill_element_bill')
|
|
||||||
->where(BillElementMapper::TABLE . '.billing_bill_element_item', '=', $id)
|
|
||||||
->andWhere(self::TABLE . '.billing_bill_performance_date', '>=', $start)
|
|
||||||
->andWhere(self::TABLE . '.billing_bill_performance_date', '<=', $end)
|
|
||||||
->execute()
|
|
||||||
?->fetch() ?? [];
|
|
||||||
|
|
||||||
return new FloatInt(((int) ($result[1] ?? 0)) === 0 ? 0 : (int) (((int) ($result[0] ?? 0)) / ((int) $result[1])));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -295,6 +299,21 @@ final class SalesBillMapper extends BillMapper
|
||||||
return self::getAll()->execute($query);
|
return self::getAll()->execute($query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Placeholder
|
||||||
|
*/
|
||||||
|
public static function getClientBills(int $id, \DateTime $start, \DateTime $end) : array
|
||||||
|
{
|
||||||
|
return self::getAll()
|
||||||
|
->with('type')
|
||||||
|
->with('type/l11n')
|
||||||
|
->where('client', $id)
|
||||||
|
->where('type/l11n/language', 'en') // @todo fix localization
|
||||||
|
->where('billDate', $start, '>=')
|
||||||
|
->where('billDate', $end, '<=')
|
||||||
|
->execute();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Placeholder
|
* Placeholder
|
||||||
*/
|
*/
|
||||||
|
|
@ -344,23 +363,26 @@ final class SalesBillMapper extends BillMapper
|
||||||
/**
|
/**
|
||||||
* Placeholder
|
* Placeholder
|
||||||
*/
|
*/
|
||||||
public static function getItemMonthlySalesCosts(int $id, \DateTime $start, \DateTime $end) : array
|
public static function getItemMonthlySalesCosts(int $item, \DateTime $start, \DateTime $end) : array
|
||||||
{
|
{
|
||||||
|
$sql = <<<SQL
|
||||||
|
SELECT
|
||||||
|
SUM(billing_bill_element_total_netsalesprice) as net_sales,
|
||||||
|
SUM(billing_bill_element_total_netpurchaseprice) as net_costs,
|
||||||
|
YEAR(billing_bill_performance_date) as year,
|
||||||
|
MONTH(billing_bill_performance_date) as month
|
||||||
|
FROM billing_bill_element
|
||||||
|
JOIN billing_bill ON billing_bill_element.billing_bill_element_bill = billing_bill.billing_bill_id
|
||||||
|
WHERE
|
||||||
|
billing_bill_element_item = {$item}
|
||||||
|
AND billing_bill_performance_date >= '{$start->format('Y-m-d H:i:s')}'
|
||||||
|
AND billing_bill_performance_date <= '{$end->format('Y-m-d H:i:s')}'
|
||||||
|
GROUP BY year, month
|
||||||
|
ORDER BY year ASC, month ASC;
|
||||||
|
SQL;
|
||||||
|
|
||||||
$query = new Builder(self::$db);
|
$query = new Builder(self::$db);
|
||||||
$result = $query->selectAs('SUM(billing_bill_element_total_netsalesprice)', 'net_sales')
|
$result = $query->raw($sql)->execute()->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
->selectAs('SUM(billing_bill_element_total_netpurchaseprice)', 'net_costs')
|
|
||||||
->selectAs('YEAR(billing_bill_performance_date)', 'year')
|
|
||||||
->selectAs('MONTH(billing_bill_performance_date)', 'month')
|
|
||||||
->from(self::TABLE)
|
|
||||||
->leftJoin(BillElementMapper::TABLE)
|
|
||||||
->on(self::TABLE . '.billing_bill_id', '=', BillElementMapper::TABLE . '.billing_bill_element_bill')
|
|
||||||
->where(BillElementMapper::TABLE . '.billing_bill_element_item', '=', $id)
|
|
||||||
->andWhere(self::TABLE . '.billing_bill_performance_date', '>=', $start)
|
|
||||||
->andWhere(self::TABLE . '.billing_bill_performance_date', '<=', $end)
|
|
||||||
->groupBy('year', 'month')
|
|
||||||
->orderBy(['year', 'month'], ['ASC', 'ASC'])
|
|
||||||
->execute()
|
|
||||||
?->fetchAll();
|
|
||||||
|
|
||||||
return $result ?? [];
|
return $result ?? [];
|
||||||
}
|
}
|
||||||
|
|
@ -368,22 +390,137 @@ final class SalesBillMapper extends BillMapper
|
||||||
/**
|
/**
|
||||||
* Placeholder
|
* Placeholder
|
||||||
*/
|
*/
|
||||||
public static function getClientMonthlySalesCosts(int $id, \DateTime $start, \DateTime $end) : array
|
public static function getClientMonthlySalesCosts(int $client, \DateTime $start, \DateTime $end) : array
|
||||||
{
|
{
|
||||||
|
$sql = <<<SQL
|
||||||
|
SELECT
|
||||||
|
SUM(billing_bill_netsales) as net_sales,
|
||||||
|
SUM(billing_bill_netcosts) as net_costs,
|
||||||
|
YEAR(billing_bill_performance_date) as year,
|
||||||
|
MONTH(billing_bill_performance_date) as month
|
||||||
|
FROM billing_bill
|
||||||
|
WHERE
|
||||||
|
billing_bill_client = {$client}
|
||||||
|
AND billing_bill_performance_date >= '{$start->format('Y-m-d H:i:s')}'
|
||||||
|
AND billing_bill_performance_date <= '{$end->format('Y-m-d H:i:s')}'
|
||||||
|
GROUP BY year, month
|
||||||
|
ORDER BY year ASC, month ASC;
|
||||||
|
SQL;
|
||||||
|
|
||||||
$query = new Builder(self::$db);
|
$query = new Builder(self::$db);
|
||||||
$result = $query->selectAs('SUM(billing_bill_netsales)', 'net_sales')
|
$result = $query->raw($sql)->execute()->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
->selectAs('SUM(billing_bill_netcosts)', 'net_costs')
|
|
||||||
->selectAs('YEAR(billing_bill_performance_date)', 'year')
|
|
||||||
->selectAs('MONTH(billing_bill_performance_date)', 'month')
|
|
||||||
->from(self::TABLE)
|
|
||||||
->where(self::TABLE . '.billing_bill_client', '=', $id)
|
|
||||||
->andWhere(self::TABLE . '.billing_bill_performance_date', '>=', $start)
|
|
||||||
->andWhere(self::TABLE . '.billing_bill_performance_date', '<=', $end)
|
|
||||||
->groupBy('year', 'month')
|
|
||||||
->orderBy(['year', 'month'], ['ASC', 'ASC'])
|
|
||||||
->execute()
|
|
||||||
?->fetchAll();
|
|
||||||
|
|
||||||
return $result ?? [];
|
return $result ?? [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getItemNetSales(int $item, \DateTime $start, \DateTime $end) : FloatInt
|
||||||
|
{
|
||||||
|
$sql = <<<SQL
|
||||||
|
SELECT SUM(billing_bill_element_single_netsalesprice) as net_sales
|
||||||
|
FROM billing_bill_element
|
||||||
|
JOIN billing_bill ON billing_bill_element.billing_bill_element_bill = billing_bill.billing_bill_id
|
||||||
|
WHERE
|
||||||
|
billing_bill_element_item = {$item}
|
||||||
|
AND billing_bill_performance_date >= '{$start->format('Y-m-d H:i:s')}'
|
||||||
|
AND billing_bill_performance_date <= '{$end->format('Y-m-d H:i:s')}';
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
$query = new Builder(self::$db);
|
||||||
|
$result = $query->raw($sql)->execute()->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
return new FloatInt((int) ($result[0]['net_sales'] ?? 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getILVHistoric(int $item) : FloatInt
|
||||||
|
{
|
||||||
|
$sql = <<<SQL
|
||||||
|
SELECT SUM(billing_bill_element_single_netsalesprice) as net_sales
|
||||||
|
FROM billing_bill_element
|
||||||
|
JOIN billing_bill ON billing_bill_element.billing_bill_element_bill = billing_bill.billing_bill_id
|
||||||
|
WHERE billing_bill_element_item = {$item}
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
$query = new Builder(self::$db);
|
||||||
|
$result = $query->raw($sql)->execute()->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
return new FloatInt((int) ($result[0]['net_sales'] ?? 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getItemMRR() : FloatInt
|
||||||
|
{
|
||||||
|
return new FloatInt(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getItemLastOrder(int $item) : ?\DateTime
|
||||||
|
{
|
||||||
|
$sql = <<<SQL
|
||||||
|
SELECT billing_bill_created_at
|
||||||
|
FROM billing_bill
|
||||||
|
JOIN billing_bill_element ON billing_bill.billing_bill_id = billing_bill_element.billing_bill_element_id
|
||||||
|
WHERE billing_bill_element_item = {$item}
|
||||||
|
ORDER BY billing_bill_created_at DESC
|
||||||
|
LIMIT 1;
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
$query = new Builder(self::$db);
|
||||||
|
$result = $query->raw($sql)->execute()->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
return isset($result[0]['billing_bill_created_at'])
|
||||||
|
? new \DateTime(($result[0]['billing_bill_created_at']))
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getClientNetSales(int $client, \DateTime $start, \DateTime $end) : FloatInt
|
||||||
|
{
|
||||||
|
$sql = <<<SQL
|
||||||
|
SELECT SUM(billing_bill_netsales) as net_sales
|
||||||
|
FROM billing_bill
|
||||||
|
WHERE
|
||||||
|
billing_bill_client = {$client}
|
||||||
|
AND billing_bill_performance_date >= '{$start->format('Y-m-d H:i:s')}'
|
||||||
|
AND billing_bill_performance_date <= '{$end->format('Y-m-d H:i:s')}';
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
$query = new Builder(self::$db);
|
||||||
|
$result = $query->raw($sql)->execute()->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
return new FloatInt((int) ($result[0]['net_sales'] ?? 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getCLVHistoric(int $client) : FloatInt
|
||||||
|
{
|
||||||
|
$sql = <<<SQL
|
||||||
|
SELECT SUM(billing_bill_netsales) as net_sales
|
||||||
|
FROM billing_bill
|
||||||
|
WHERE billing_bill_client = {$client};
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
$query = new Builder(self::$db);
|
||||||
|
$result = $query->raw($sql)->execute()->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
return new FloatInt((int) ($result[0]['net_sales'] ?? 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getClientMRR() : FloatInt
|
||||||
|
{
|
||||||
|
return new FloatInt(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getClientLastOrder(int $client) : ?\DateTime
|
||||||
|
{
|
||||||
|
$sql = <<<SQL
|
||||||
|
SELECT billing_bill_created_at
|
||||||
|
FROM billing_bill
|
||||||
|
WHERE billing_bill_client = {$client}
|
||||||
|
ORDER BY billing_bill_created_at DESC
|
||||||
|
LIMIT 1;
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
$query = new Builder(self::$db);
|
||||||
|
$result = $query->raw($sql)->execute()->fetchAll(\PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
|
return isset($result[0]['billing_bill_created_at'])
|
||||||
|
? new \DateTime(($result[0]['billing_bill_created_at']))
|
||||||
|
: null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,13 +49,13 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="tabview tab-2 col-simple">
|
<div class="tabview tab-2 col-simple">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<ul class="tab-links">
|
<ul class="tab-links">
|
||||||
<li><label for="c-tab-1"><?= $this->getHtml('Invoice'); ?></label></li>
|
<li><label for="c-tab-1"><?= $this->getHtml('Invoice'); ?></label>
|
||||||
<li><label for="c-tab-2"><?= $this->getHtml('Items'); ?></label></li>
|
<li><label for="c-tab-2"><?= $this->getHtml('Items'); ?></label>
|
||||||
<li><label for="c-tab-3"><?= $this->getHtml('Preview'); ?></label></li>
|
<li><label for="c-tab-3"><?= $this->getHtml('Preview'); ?></label>
|
||||||
<li><label for="c-tab-4"><?= $this->getHtml('Archive'); ?></label></li>
|
<li><label for="c-tab-4"><?= $this->getHtml('Archive'); ?></label>
|
||||||
<li><label for="c-tab-5"><?= $this->getHtml('Payment'); ?></label></li>
|
<li><label for="c-tab-5"><?= $this->getHtml('Payment'); ?></label>
|
||||||
<li><label for="c-tab-6"><?= $this->getHtml('Media'); ?></label></li>
|
<li><label for="c-tab-6"><?= $this->getHtml('Media'); ?></label>
|
||||||
<li><label for="c-tab-7"><?= $this->getHtml('Logs'); ?></label></li>
|
<li><label for="c-tab-7"><?= $this->getHtml('Logs'); ?></label>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-content col-simple">
|
<div class="tab-content col-simple">
|
||||||
|
|
@ -349,7 +349,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
|
|
||||||
<?php if ($editable) : ?>
|
<?php if ($editable) : ?>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<input type="submit" class="add-form" value="<?= $this->getHtml('Add', '0', '0') ?>" form="invoiceElements">
|
<input type="submit" class="add-form" value="<?= $this->getHtml('Add', '0', '0'); ?>" form="invoiceElements">
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -481,7 +481,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
|
|
||||||
<?php if ($editable) : ?>
|
<?php if ($editable) : ?>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<input type="submit" class="add-payment-form" value="<?= $this->getHtml('Add', '0', '0') ?>" form="paymentPlan">
|
<input type="submit" class="add-payment-form" value="<?= $this->getHtml('Add', '0', '0'); ?>" form="paymentPlan">
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -497,7 +497,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Logs'); ?><i class="g-icon download btn end-xs">download</i></div>
|
<div class="portlet-head"><?= $this->getHtml('Logs'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||||
<table class="default">
|
<table class="default sticky">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use phpOMS\System\File\FileUtils;
|
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
// Media helper functions (e.g. file icon generator)
|
// Media helper functions (e.g. file icon generator)
|
||||||
|
|
@ -40,13 +39,13 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="tabview tab-2 col-simple">
|
<div class="tabview tab-2 col-simple">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<ul class="tab-links">
|
<ul class="tab-links">
|
||||||
<li><label for="c-tab-1"><?= $this->getHtml('Invoice'); ?></label></li>
|
<li><label for="c-tab-1"><?= $this->getHtml('Invoice'); ?></label>
|
||||||
<li><label for="c-tab-2"><?= $this->getHtml('Items'); ?></label></li>
|
<li><label for="c-tab-2"><?= $this->getHtml('Items'); ?></label>
|
||||||
<li><label for="c-tab-3"><?= $this->getHtml('Preview'); ?></label></li>
|
<li><label for="c-tab-3"><?= $this->getHtml('Preview'); ?></label>
|
||||||
<li><label for="c-tab-4"><?= $this->getHtml('Original'); ?></label></li>
|
<li><label for="c-tab-4"><?= $this->getHtml('Original'); ?></label>
|
||||||
<li><label for="c-tab-5"><?= $this->getHtml('Payment'); ?></label></li>
|
<li><label for="c-tab-5"><?= $this->getHtml('Payment'); ?></label>
|
||||||
<li><label for="c-tab-6"><?= $this->getHtml('Media'); ?></label></li>
|
<li><label for="c-tab-6"><?= $this->getHtml('Media'); ?></label>
|
||||||
<li><label for="c-tab-7"><?= $this->getHtml('Logs'); ?></label></li>
|
<li><label for="c-tab-7"><?= $this->getHtml('Logs'); ?></label>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-content col-simple">
|
<div class="tab-content col-simple">
|
||||||
|
|
@ -152,7 +151,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Invoice'); ?><i class="g-icon download btn end-xs">download</i></div>
|
<div class="portlet-head"><?= $this->getHtml('Invoice'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||||
<div class="slider">
|
<div class="slider">
|
||||||
<table class="default" id="invoice-item-list">
|
<table class="default sticky" id="invoice-item-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -279,7 +278,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Logs'); ?><i class="g-icon download btn end-xs">download</i></div>
|
<div class="portlet-head"><?= $this->getHtml('Logs'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||||
<table class="default">
|
<table class="default sticky">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||||
|
|
|
||||||
|
|
@ -36,13 +36,13 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="tabview tab-2">
|
<div class="tabview tab-2">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<ul class="tab-links">
|
<ul class="tab-links">
|
||||||
<li><label for="c-tab-1"><?= $this->getHtml('Invoice'); ?></label></li>
|
<li><label for="c-tab-1"><?= $this->getHtml('Invoice'); ?></label>
|
||||||
<li><label for="c-tab-2"><?= $this->getHtml('Items'); ?></label></li>
|
<li><label for="c-tab-2"><?= $this->getHtml('Items'); ?></label>
|
||||||
<li><label for="c-tab-3"><?= $this->getHtml('Preview'); ?></label></li>
|
<li><label for="c-tab-3"><?= $this->getHtml('Preview'); ?></label>
|
||||||
<li><label for="c-tab-4"><?= $this->getHtml('Original'); ?></label></li>
|
<li><label for="c-tab-4"><?= $this->getHtml('Original'); ?></label>
|
||||||
<li><label for="c-tab-5"><?= $this->getHtml('Payment'); ?></label></li>
|
<li><label for="c-tab-5"><?= $this->getHtml('Payment'); ?></label>
|
||||||
<li><label for="c-tab-6"><?= $this->getHtml('Media'); ?></label></li>
|
<li><label for="c-tab-6"><?= $this->getHtml('Media'); ?></label>
|
||||||
<li><label for="c-tab-7"><?= $this->getHtml('Logs'); ?></label></li>
|
<li><label for="c-tab-7"><?= $this->getHtml('Logs'); ?></label>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
|
@ -147,7 +147,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Invoice'); ?><i class="g-icon download btn end-xs">download</i></div>
|
<div class="portlet-head"><?= $this->getHtml('Invoice'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||||
<table class="default" id="invoice-item-list">
|
<table class="default sticky" id="invoice-item-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -275,7 +275,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<table class="layout wf-100">
|
<table class="layout wf-100">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td colspan="2"><label for="iMedia"><?= $this->getHtml('Media'); ?></label>
|
<tr><td colspan="2"><label for="iMedia"><?= $this->getHtml('Media'); ?></label>
|
||||||
<tr><td><input type="text" id="iMedia" placeholder=" File"><td><button><?= $this->getHtml('Select'); ?></button>
|
<tr><td><input type="text" id="iMedia" placeholder="File"><td><button><?= $this->getHtml('Select'); ?></button>
|
||||||
<tr><td colspan="2"><label for="iUpload"><?= $this->getHtml('Upload'); ?></label>
|
<tr><td colspan="2"><label for="iUpload"><?= $this->getHtml('Upload'); ?></label>
|
||||||
<tr><td><input type="file" id="iUpload" form="fTask"><input form="fTask" type="hidden" name="type"><td>
|
<tr><td><input type="file" id="iUpload" form="fTask"><input form="fTask" type="hidden" name="type"><td>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -287,7 +287,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="col-xs-12 col-md-6 col-lg-8">
|
<div class="col-xs-12 col-md-6 col-lg-8">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Media'); ?><i class="g-icon download btn end-xs">download</i></div>
|
<div class="portlet-head"><?= $this->getHtml('Media'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||||
<table class="default" id="invoice-item-list">
|
<table class="default sticky" id="invoice-item-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -324,7 +324,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="box wf-100">
|
<div class="box wf-100">
|
||||||
<table class="default">
|
<table class="default sticky">
|
||||||
<caption><?= $this->getHtml('Logs'); ?><i class="g-icon end-xs download btn">download</i></caption>
|
<caption><?= $this->getHtml('Logs'); ?><i class="g-icon end-xs download btn">download</i></caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
"name": "Jingga",
|
"name": "Jingga",
|
||||||
"website": "jingga.app"
|
"website": "jingga.app"
|
||||||
},
|
},
|
||||||
"description": "Accounting module.",
|
|
||||||
"directory": "Billing",
|
"directory": "Billing",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Admin": "1.0.0",
|
"Admin": "1.0.0",
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Billing\tests\Controller\Api;
|
namespace Modules\Billing\tests\Controller\Api;
|
||||||
|
|
||||||
use phpOMS\Account\AccountStatus;
|
|
||||||
use phpOMS\Account\AccountType;
|
|
||||||
use phpOMS\Message\Http\HttpRequest;
|
use phpOMS\Message\Http\HttpRequest;
|
||||||
use phpOMS\Message\Http\HttpResponse;
|
use phpOMS\Message\Http\HttpResponse;
|
||||||
use phpOMS\Message\Http\RequestStatusCode;
|
use phpOMS\Message\Http\RequestStatusCode;
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,11 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Billing\tests\Controller\Api;
|
namespace Modules\Billing\tests\Controller\Api;
|
||||||
|
|
||||||
use phpOMS\Account\AccountStatus;
|
|
||||||
use phpOMS\Account\AccountType;
|
|
||||||
use phpOMS\Message\Http\HttpRequest;
|
use phpOMS\Message\Http\HttpRequest;
|
||||||
use phpOMS\Message\Http\HttpResponse;
|
use phpOMS\Message\Http\HttpResponse;
|
||||||
use phpOMS\Message\Http\RequestStatusCode;
|
use phpOMS\Message\Http\RequestStatusCode;
|
||||||
use phpOMS\System\File\Local\Directory;
|
use phpOMS\System\File\Local\Directory;
|
||||||
use phpOMS\Uri\HttpUri;
|
use phpOMS\Uri\HttpUri;
|
||||||
use phpOMS\Utils\RnG\DateTime;
|
|
||||||
use phpOMS\Utils\TestUtils;
|
use phpOMS\Utils\TestUtils;
|
||||||
|
|
||||||
trait ApiPurchaseControllerTrait
|
trait ApiPurchaseControllerTrait
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user