fix tests

This commit is contained in:
Dennis Eichhorn 2024-04-25 13:34:46 +00:00
parent b3567a6569
commit 5352da7484
2 changed files with 7 additions and 7 deletions

View File

@ -535,15 +535,15 @@ final class ApiBillController extends Controller
* 'sales_tax_code', 'purchase_tax_code', 'costcenter', 'costobject',
* 'default_purchase_container', 'default_sales_container',
*
* @param Item $item The item object for which the bill element is being created
* @param Bill $bill The bill object for which the bill element is being created
* @param RequestAbstract $request The request object that contains the header account
* @param Item $item The item object for which the bill element is being created
* @param Bill $bill The bill object for which the bill element is being created
* @param HttpRequest $request The request object that contains the header account
*
* @return BillElement
*
* @since 1.0.0
*/
public function createBaseBillElement(Item $item, Bill $bill, RequestAbstract $request) : BillElement
public function createBaseBillElement(Item $item, Bill $bill, HttpRequest $request) : BillElement
{
// Handle person tax code for finding tax combination below
$attr = new NullAttribute();

View File

@ -385,7 +385,7 @@ final class SalesBillMapper extends BillMapper
$hasData = false;
foreach ($results as $result) {
if ($result !== "0" || $result > 0) {
if ($result !== '0' || ((int) $result) > 0) {
$hasData = true;
break;
}
@ -434,8 +434,8 @@ final class SalesBillMapper extends BillMapper
$hasData = false;
foreach ($results as $result) {
if ($result['net_sales'] !== "0" || $result['net_sales'] > 0
|| $result['net_costs'] !== "0" || $result['net_costs'] > 0
if ($result['net_sales'] !== '0' || ((int) $result['net_sales']) > 0
|| $result['net_costs'] !== '0' || ((int) $result['net_costs']) > 0
) {
$hasData = true;
break;