Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-mbs committed Nov 21, 2024
1 parent 2caeda7 commit 4d857e3
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 22 deletions.
6 changes: 3 additions & 3 deletions www/app/entity/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function init() {

public static function updateTags(array $tags,int $type,int $item_id) {

$conn = \ZDB\db::getConnect() ;
$conn = \ZDB\DB::getConnect() ;
$conn->Execute("delete from taglist where tag_type={$type} and item_id={$item_id} ");

foreach($tags as $tag) {
Expand All @@ -36,7 +36,7 @@ public static function updateTags(array $tags,int $type,int $item_id) {
}

public static function getTags(int $type,int $item_id=0) {
$conn = \ZDB\db::getConnect() ;
$conn = \ZDB\DB::getConnect() ;

if($item_id >0){
$r = $conn->GetCol("select distinct tag_name from taglist where tag_type={$type} and item_id={$item_id} order by tag_name ");
Expand All @@ -55,7 +55,7 @@ public static function getTags(int $type,int $item_id=0) {
}

public static function getSuggestions(int $type) {
$conn = \ZDB\db::getConnect() ;
$conn = \ZDB\DB::getConnect() ;

$ret = $conn->GetCol("select distinct tag_name from taglist where tag_type={$type} order by tag_name ");

Expand Down
2 changes: 1 addition & 1 deletion www/app/modules/shop/pages/catalog/compare.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct() {
public function plistOnRow($row) {
$item = $row->getDataItem();

$row->add(new \Zippy\html\Image('pim'))->setUrl('/loadshopimage.php?id='.$item->image_id);
$row->add(new \Zippy\Html\Image('pim'))->setUrl('/loadshopimage.php?id='.$item->image_id);
$row->add(new Label("pname"))->setText($item->itemname) ;
$row->add(new Label("pprice"))->setText(\App\Helper::fa($item->getPriceFinal()));
$row->add(new ClickLink("pdel", $this, "onDel")) ;
Expand Down
4 changes: 2 additions & 2 deletions www/app/pages/reference/customerlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ private function updateContrs() {
}

private function updateDocs() {
$this->_doclist = \App\Entity\doc\Document::find(' state <> 9 and customer_id=' . $this->_customer->customer_id,'document_date desc',10);
$this->_doclist = \App\Entity\Doc\Document::find(' state <> 9 and customer_id=' . $this->_customer->customer_id,'document_date desc',10);
$this->contentview->dw_doc->Reload();

}
Expand Down Expand Up @@ -714,7 +714,7 @@ public function docListOnRow(DataRow $row) {
$doc = $row->getDataItem();

$row->add(new Label('doc_amount', Helper::fa($doc->amount) ));
$row->add(new Label('doc_state', \App\Entity\doc\Document::getStateName($doc->state) ));
$row->add(new Label('doc_state', \App\Entity\Doc\Document::getStateName($doc->state) ));

$row->add(new ClickLink('doc'))->onClick($this, 'docOnClick');
$row->doc->setValue($doc->document_number);
Expand Down
7 changes: 4 additions & 3 deletions www/app/pages/reference/itemlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ public function setOnClick($sender) {
$this->_tvars['complout'] = $item->item_type== Item::TYPE_MAT || $item->item_type== Item::TYPE_HALFPROD ;
$this->_tvars['conploutlist'] = [];

$conn = \ZDB\db::getConnect() ;
$conn = \ZDB\DB::getConnect() ;

$sql="SELECT s.qty,i.item_code,i.itemname FROM
items i JOIN item_set s ON i.item_id=s.pitem_id
Expand Down Expand Up @@ -1141,6 +1141,7 @@ public function printStOnClick($sender) {
public function getSticker($args, $post) {
$printer = \App\System::getOptions('printer') ;
$user = \App\System::getUser() ;


$item = Item::load($post["stitemid"]) ;

Expand Down Expand Up @@ -1170,10 +1171,10 @@ public function getSticker($args, $post) {
$report = new \App\Report('item_sticker.tpl');

$header['turn'] = $user->prturn ??'';
if($prturn == 1) {
if($user->prturn == 1) {
$header['turn'] = 'transform: rotate(90deg);';
}
if($prturn == 2) {
if($user->prturn == 2) {
$header['turn'] = 'transform: rotate(-90deg);';
}

Expand Down
2 changes: 1 addition & 1 deletion www/app/pages/register/grlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function doclistOnRow(\Zippy\Html\DataList\DataRow $row) {
}

public function statusOnSubmit($sender) {
if (\App\Acl::checkChangeStateDoc($this->_doc, true, true) == false) {
if (\App\ACL::checkChangeStateDoc($this->_doc, true, true) == false) {
return;
}

Expand Down
8 changes: 4 additions & 4 deletions www/app/pages/register/itemlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public function showOnClick($sender) {
$interval = date_diff($d1,$d2);

if($interval->days >30) {
$conn=\ZDB\db::getConnect() ;
$conn=\ZDB\DB::getConnect() ;
$sql="select sum(0-quantity) from entrylist_view where item_id={$item->item_id} and quantity < 0 {$st} and document_id in (select document_id from documents_view where meta_name in ('GoodsIssue','TTN','POSCheck','OrderFood') ) ";
$sell = $conn->GetOne($sql) ;
$sell = number_format($sell/$interval->days*30, 1, '.', '');
Expand Down Expand Up @@ -483,11 +483,11 @@ public function onprint($sender) {


if(\App\System::getUser()->usemobileprinter == 1) {
\App\Session::getSession()->printform = $htmls;
\App\Session::getSession()->printform = $ret;

$this->addAjaxResponse(" $('.seldel').prop('checked',null); window.open('/index.php?p=App/Pages/ShowReport&arg=print')");
} else {
$this->addAjaxResponse(" $('#tag').html('{$htmls}') ;$('.seldel').prop('checked',null); $('#pform').modal()");
$this->addAjaxResponse(" $('#tag').html('{$ret}') ;$('.seldel').prop('checked',null); $('#pform').modal()");

}
return;
Expand All @@ -506,7 +506,7 @@ public function onprint($sender) {

}
$b = json_encode($buf) ;
$this->addAjaxResponse("$('.seldel').prop('checked',null); sendPSlabel('{$b}') ");
$this->addAjaxResponse("$('.seldel').prop('checked',null); sendPSlabel('{$b}') ");
} catch(\Exception $e) {
$message = $e->getMessage() ;
$message = str_replace(";", "`", $message) ;
Expand Down
2 changes: 1 addition & 1 deletion www/app/pages/register/orderlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ public function showOnClick($sender) {
$this->updateStatusButtons();
$this->goAnkor('dankor');
$this->_tvars['askclose'] = false;
$conn= \ZDB\db::getConnect() ;
$conn= \ZDB\DB::getConnect() ;

$stl = array() ;
foreach($conn->Execute("select store_id,storename from stores") as $row) {
Expand Down
2 changes: 1 addition & 1 deletion www/app/pages/report/outcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ private function generateReport() {
$header['totsumma'] = H::fa($totsum);
$header['totnavar'] = H::fa($totnavar);

$header['totall'] = H::fa($totsum - $disc);
$header['totall'] = H::fa($totsum );

$header['noshowpartion'] = $this->_tvars['noshowpartion'] ;

Expand Down
10 changes: 5 additions & 5 deletions www/app/pages/service/armpos.php
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ public function savedocOnClick($sender) {
$this->_doc->headerdata['bonus'] = $this->docpanel->form2->bonus->getText();
$this->_doc->headerdata['totaldisc'] = $this->docpanel->form2->totaldisc->getText();

if ($this->_doc->amount > 0 && $this->_doc->payamount > $this->_doc->payed && $this->_doc->customer_id == 0) {
if ($this->_doc->payed > 0 && $this->_doc->payamount > $this->_doc->payed && $this->_doc->customer_id == 0) {
$this->setError("Якщо у борг або передоплата або нарахування бонусів має бути обраний контрагент");
return;
}
Expand Down Expand Up @@ -1941,12 +1941,12 @@ public function checkPromo($args, $post=null) {
return json_encode($ret, JSON_UNESCAPED_UNICODE);

}
if($discf >0) {
if($disc >0) {

if($total < $discf) {
$discf = $total;
if($total < $disc) {
$disc = $total;
}
$ret=array('disc'=>$discf) ;
$ret=array('disc'=>$disc) ;
return json_encode($ret, JSON_UNESCAPED_UNICODE);

}
Expand Down
2 changes: 1 addition & 1 deletion www/app/widgets/itemsel.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public function getItems($start, $count, $sortfield = null, $asc = null) {
foreach (Item::findYield($this->getWhere(), $sortfield, $count, $start) as $item) {

if (strlen($this->page->_pricetype) > 0) {
$item->price = $item->getPrice($this->page->_pricetype, $this->_store);
$item->price = $item->getPrice($this->page->_pricetype, $this->page->_store);
}

$list[] = $item;
Expand Down

0 comments on commit 4d857e3

Please sign in to comment.