Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-mbs committed Dec 17, 2024
1 parent d1dfa47 commit 54e289b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
18 changes: 11 additions & 7 deletions www/app/pages/register/paybaylist.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Zippy\Html\Link\ClickLink;
use Zippy\Html\Link\RedirectLink;
use Zippy\Html\Panel;
use Zippy\Html\DataList\Paginator;

/**
* журнал расчет с покупателями
Expand Down Expand Up @@ -61,6 +62,8 @@ public function __construct($docid=0) {
$this->dlist->add(new Label("cnamed"));
$this->dlist->add(new ClickLink("backd", $this, "onBack"));
$this->dlist->add(new DataView('blist', new ArrayDataSource($this, '_blist'), $this, 'blistOnRow'));
$this->dlist->add(new Paginator('pagd', $this->dlist->blist));
$this->dlist->blist->setPageSize(H::getPG());


$this->add(new \App\Widgets\DocView('docview'))->setVisible(false);
Expand All @@ -75,7 +78,7 @@ public function __construct($docid=0) {
$this->paypan->payform->add(new Date('pdate', time()));

$this->paypan->add(new DataView('paylist', new ArrayDataSource($this, '_pays'), $this, 'payOnRow'))->Reload();


$this->updateCust();

Expand Down Expand Up @@ -460,11 +463,15 @@ public function updateDetDocs() {
WHERE cv.customer_id={$this->_cust->customer_id}
{$br} AND optype IN (2)
GROUP BY cv.document_id,cv.document_number,cv.createdon,dv.meta_desc,dv.branch_name
HAVING active <> passive
ORDER BY cv.document_id ";

foreach ( $conn->Execute($sql) as $d) {


$diff = $d['active'] - $d['passive'];
if($diff==0) {
continue;
}
$r = new \App\DataItem() ;
$r->document_id = $d['document_id'];
$r->meta_desc = $d['meta_desc'];
Expand All @@ -475,17 +482,14 @@ public function updateDetDocs() {
$r->b_passive = $d['passive'];


$diff = $d['active'] - $d['passive'];
if($diff==0) {
continue;
}

$bal += $diff;

$r->bal = $bal;

$this->_blist[] = $r;
if($bal==0) {
$this->_blist = array();
$this->_blist = [];
}


Expand Down
16 changes: 10 additions & 6 deletions www/app/pages/register/paysellist.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Zippy\Html\Link\ClickLink;
use Zippy\Html\Link\RedirectLink;
use Zippy\Html\Panel;
use Zippy\Html\DataList\Paginator;

/**
* журнал расчет с поставщиками
Expand Down Expand Up @@ -59,6 +60,8 @@ public function __construct($docid=0) {
$this->dlist->add(new Label("cnamed"));
$this->dlist->add(new ClickLink("backd", $this, "onBack"));
$this->dlist->add(new DataView('blist', new ArrayDataSource($this, '_blist'), $this, 'blistOnRow'));
$this->dlist->add(new Paginator('pagd', $this->dlist->blist));
$this->dlist->blist->setPageSize(H::getPG());


$this->add(new \App\Widgets\DocView('docview'))->setVisible(false);
Expand All @@ -73,7 +76,7 @@ public function __construct($docid=0) {
$this->paypan->payform->add(new Date('pdate', time()));

$this->paypan->add(new DataView('paylist', new ArrayDataSource($this, '_pays'), $this, 'payOnRow'))->Reload();


$this->updateCust();

Expand Down Expand Up @@ -451,11 +454,15 @@ public function updateDetDocs() {
WHERE cv.customer_id={$this->_cust->customer_id}
{$br} AND optype IN (3)
GROUP BY cv.document_id,cv.document_number,cv.createdon,dv.meta_desc,dv.branch_name
HAVING active <> passive
ORDER BY cv.document_id ";

foreach ( $conn->Execute($sql) as $d) {


$diff = $d['active'] - $d['passive'];
if($diff==0) {
continue;
}

$r = new \App\DataItem() ;
$r->document_id = $d['document_id'];
Expand All @@ -466,10 +473,7 @@ public function updateDetDocs() {
$r->s_active = $d['active'];
$r->s_passive = $d['passive'];

$diff = $d['active'] - $d['passive'];
if($diff==0) {
continue;
}

$bal += $diff;
$r->bal = $bal;

Expand Down
2 changes: 1 addition & 1 deletion www/templates/pages/register/paybaylist.html
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ <h3 zippy="cnamed"></h3>

</tr>
</table>

<div zippy="pagd"></div>
</div>
<div class="col-12 col-lg-10 col-xl-8 "> <a id="dankor"></a>
<div zippy="docview"></div>
Expand Down
2 changes: 1 addition & 1 deletion www/templates/pages/register/paysellist.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ <h3 zippy="cnamed"></h3>

</tr>
</table>

<div zippy="pagd"></div>
</div>

<div class="col-12 col-lg-10 col-xl-8 "> <a id="dankor"></a>
Expand Down

0 comments on commit 54e289b

Please sign in to comment.