From f9c78c94abb36452db7d0ed5c175388840f8de0a Mon Sep 17 00:00:00 2001 From: babak alizadeh Date: Thu, 29 Aug 2024 10:03:26 +0330 Subject: [PATCH] bug fix in print options auto create --- hesabixCore/src/Controller/PrintersController.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hesabixCore/src/Controller/PrintersController.php b/hesabixCore/src/Controller/PrintersController.php index ef9ed67..fbfa861 100644 --- a/hesabixCore/src/Controller/PrintersController.php +++ b/hesabixCore/src/Controller/PrintersController.php @@ -17,6 +17,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; +use function PHPUnit\Framework\isNull; + class PrintersController extends AbstractController { @@ -116,8 +118,13 @@ class PrintersController extends AbstractController $settings->setSellNoteString($params['sell']['noteString']); $settings->setSellPays($params['sell']['pays']); $settings->setSellPaper($params['sell']['paper']); - - $settings->setBuyBidInfo($params['buy']['bidInfo']); + if($params['buy']['bidInfo'] == null){ + $settings->setBuyBidInfo(false); + } + else{ + $settings->setBuyBidInfo(true); + } + $settings->setBuyTaxInfo($params['buy']['taxInfo']); $settings->setBuyDiscountInfo($params['buy']['discountInfo']); $settings->setBuyNote($params['buy']['note']);