Skip to content

Commit

Permalink
#C12027 - bugFix: номерация при "Кореспонденция по сметки"
Browse files Browse the repository at this point in the history
  • Loading branch information
GPetrova committed Apr 18, 2016
1 parent a027a32 commit 8336b69
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions acc/reports/CorespondingImpl.class.php
Expand Up @@ -486,6 +486,8 @@ public function prepareInnerState()
*/
public static function on_AfterPrepareEmbeddedData($mvc, &$data)
{
$recs = array();

// Ако има намерени записи
if(count($data->recs)){

Expand All @@ -499,14 +501,17 @@ public static function on_AfterPrepareEmbeddedData($mvc, &$data)
arr::order($data->recs, $mvc->innerForm->orderField, $mvc->innerForm->orderBy);

if ($mvc->innerForm->compare != 'no') {
$recs = $data->recsAll;

foreach ($data->recsAll as $recsAll) {
$recs[] = $recsAll;
}
} else {
$recs = $data->recs;
}

if(count($recs)) {
// За всеки запис
foreach ($recs as $id=>&$rec){
foreach ($recs as $id=>&$rec){
$rec->id = $id+1;
// Ако не е за текущата страница не го показваме
if(!$data->Pager->isOnPage()) continue;
Expand Down

0 comments on commit 8336b69

Please sign in to comment.