status == 0) { print '
' . "\n"; print ''; print ''; print ''; print ''; print ''; print ''; print ''; $from = date('Y-m-d H:i:s', $packageHistoryRecordObj->date_creation); $to = date('Y-m-d H:i:s', dol_now()); print '
'; print ''; print ''; print ''; print '  '; # # Jutalék Lezárt # $commissionClosed = $commmissionhandler->getTotalCommissionFromThisPeriod($user_id, $from, $to); print ''; # # Jutalék (kalkulált) # $commission = $commmissionhandler->getTotalCommission($user_id, $from, $to); print ''; $withholdingTD = ''; print '' . $withholdingTD . ''; # # Eszközök listája # $counter = 1; //print_r($withholdingsArray); exit; //print_r($withholdingsChkArray); if ($BLock2ndData) { foreach ($BLock2ndData as $device) { $displayConfirmButton = 'display:inline-block'; $displayPrinterButton = 'display:none'; # checkboxes $checkedDevice = $dailyClosing->getChecked($deviceArray, $device); $deviceWHChk = $dailyClosing->getDeviceWHChk($deviceArray, $device); $deviceAmount = $dailyClosing->getDeviceAmount($amountArray, $device); //print_r($checkedDevice); $checkedDailyIncomeHUF = $dailyClosing->getCheckedDailyIncomeHUF($deviceArray); $dailyAmountHUFChk = $dailyClosing->getDailyAmountHUFChk($deviceArray); $checkedDailyIncomeEUR = $dailyClosing->getCheckedDailyIncomeEUR($deviceArray); $dailyAmountEURChk = $dailyClosing->getDailyAmountEURChk($deviceArray); $witholdingIdentifier = 'd' . $device['device_id'] . '_amount'; $witholdingChkIdentifier = 'd' . $device['device_id']; if (isset($withholdingsArray[$witholdingIdentifier]) && $withholdingsArray[$witholdingIdentifier] !== '') { $deviceAmount = $withholdingsArray[$witholdingIdentifier]; } if ($withholdingsChkArray[$witholdingChkIdentifier] == '1') { $checkedDevice = 'checked'; $deviceWHChk = "display:none;"; } //print_r($checkedDevice); print ''; print ''; $counter++; } } if (!empty($addititonalDevices)) { foreach ($addititonalDevices as $key => $value) { $device['device_id'] = $key; $checkedAdditional = $dailyClosing->getChecked($deviceArray, $device); $deviceWHChk = $dailyClosing->getDeviceWHChk($deviceArray, $device); $deviceAmount = $dailyClosing->getDeviceAmount($amountArray, $device); $witholdingIdentifier = 'd' . $key . '_amount'; $witholdingChkIdentifier = 'd' . $key; if (isset($withholdingsArray[$witholdingIdentifier]) && $withholdingsArray[$witholdingIdentifier] !== '') { $deviceAmount = $withholdingsArray[$witholdingIdentifier]; } if ($withholdingsChkArray[$witholdingChkIdentifier] == '1') { $checkedAdditional = 'checked'; $deviceWHChk = "display:none;"; } print ''; print ''; $counter++; } } print '
' . $name . '
' . $from . ' - ' . $to . '
' . $langs->trans('UserGroupName') . ': ' . $helper->getUserGroupRefById($packageHistoryRecordObj->fk_groupuser_id) . '
' . $langs->trans('ToolGroupName') . ': ' . $helper->getGroupLabelById($packageHistoryRecordObj->fk_group_id) . '
' . $langs->trans('PackageName') . ': ' . $helper->getPackageLabelById($packageHistoryRecordObj->package_id) . '
'; if (count($commissionClosed) > 0) { foreach ($commissionClosed as $commission) { print ''; } } else { print ''; } print '
' . $langs->trans('CommissionClosed') . '
' . $commission['date_creation'] . '' . $commission['label'] . '' . $helper->correctNumber(intval($commission['amount'])) . ' HUF
' . $langs->trans('NoCommission') . '
 
' . $langs->trans('ExpectedCommission') . '
' . $helper->correctNumber(intval($commission)) . ' HUF
 
' . $langs->trans('Withhold') . '
' . $langs->trans('DevicesList') . '
' . $device['ref'] . '' . $device['title'] . ' HUF
' . $helper->getAdditionalTitle($key) . '' . $value . ' HUF
 '; # # Napi bevétel KP # if (isset($withholdingsArray['_daily_HUFcash_amount']) && $withholdingsArray['_daily_HUFcash_amount'] !== '') { $_daily_HUFcash_amount = $withholdingsArray['_daily_HUFcash_amount']; }else{ $_daily_HUFcash_amount = $amountArray['_daily_HUFcash_amount']; } if($withholdingsChkArray['_daily_HUFcash'] == 1){ $checkedDailyIncomeHUF = 'checked'; $dailyAmountHUFChk = "display:none"; } if (isset($withholdingsArray['_daily_EURcash_amount']) && $withholdingsArray['_daily_EURcash_amount'] !== '') { $_daily_EURcash_amount = $withholdingsArray['_daily_EURcash_amount']; }else{ $_daily_EURcash_amount = $amountArray['_daily_EURcash_amount']; } if($withholdingsChkArray['_daily_EURcash'] == 1){ $checkedDailyIncomeEUR = 'checked'; $dailyAmountEURChk = "display:none"; } print '' . $withholdingTD . ''; $counter++; print '
' . $langs->trans('DailyIncomeCash') . '
' . $langs->trans('DailyIncomeCash') . ' HUF:' . $helper->correctNumber($BLock3rdData['HUFcash']) . ' HUF HUF
' . $langs->trans('DailyIncomeCash') . ' EUR:' . $helper->correctNumber($BLock3rdData['EURcash']) . ' EUR HUF
'; # # Napi bevétel kártya # print '
' . $langs->trans('DailyIncomeCard') . '
HUF:' . $helper->correctNumber(intval($BLock3rdData['HUFcard'])) . ' HUF
EUR:' . $helper->correctNumber((intval($BLock3rdData['EURcard']))) . ' EUR
 '; # # Teljes összeg KP + váltó # print '
' . $langs->trans('TotalAmountCash') . '
 ' . $langs->trans('DailyIncomeCash') . '' . $langs->trans('Change') . '' . $langs->trans('TotalAmountCash') . '
HUF:' . $helper->correctNumber($BLock3rdData['HUFcash']) . ' HUF ' . $helper->correctNumber(intval($addititonalChangesDevices['change_huf'])) . ' HUF ' . $helper->correctNumber(intval($BLock3rdData['HUFcash'] + intval($addititonalChangesDevices['change_huf']))) . ' HUF
EUR:' . $helper->correctNumber($BLock3rdData['EURcash']) . ' EUR ' . $helper->correctNumber(intval($addititonalChangesDevices['change_eur'])) . ' EUR ' . $helper->correctNumber((intval($BLock3rdData['EURcash']) + intval($addititonalChangesDevices['change_eur']))) . ' EUR
 '; # # Teljes összeg KP + kartya # print '
' . $langs->trans('TotalAmount') . '
 ' . $langs->trans('DailyIncomeCash') . '' . $langs->trans('DailyIncomeCard') . '' . $langs->trans('TotalAmount') . '
HUF:' . $helper->correctNumber($BLock3rdData['HUFcash']) . ' HUF ' . $helper->correctNumber($BLock3rdData['HUFcard']) . ' HUF ' . $helper->correctNumber(intval($BLock3rdData['HUFcash'] + intval($BLock3rdData['HUFcard']))) . ' HUF
EUR:' . $helper->correctNumber($BLock3rdData['EURcash']) . ' EUR ' . $helper->correctNumber($BLock3rdData['EURcard']) . ' EUR ' . $helper->correctNumber(intval($BLock3rdData['EURcash']) + intval($BLock3rdData['EURcard'])) . ' EUR
 '; # # Unprinted factures # print ''; print ''; print '
Unprinted factures
'; print $dailyClosing->unprintedFactures($packageHistoryRecordObj->fk_group_id, $user_id, $from); # # Checkbox # print '
 
'; print '
' . $langs->trans('EverythingOK') . '
 '; # # Confirm buttons # print '
'; print '
'; print ' '; print '
'; print ''; print '
' . $langs->trans('FactureList') . '
'; print ''; $printedFactures = $dailyClosing->printedFactures($packageHistoryRecordObj->fk_group_id, $user_id); $rownum = 0; print ''; foreach ($factures as $facture) { $checked = $facture['marked_for_storno'] ? 'checked' : ''; $checkedCommission = $facture['commission_deduction'] ? 'checked' : ''; $bgcolor = $dailyClosing->setRowColor($rownum); $printed = ''; $numberOfPrints = 0; //$disabled = $facture['marked_for_storno'] ? 'disabled' : ''; if (in_array($facture['rowid'], $printedFactures)) { $printed = '
Printed
'; $numberOfPrints = $dailyClosing->getTheNumberOfPrints($facture['rowid']); } print ''; $rownum++; } print '
  Mark for storno   No commission Number of prints
' . $facture['ref'] . ' ' . $facture['date_closing'] . ' ' . $facture['libelle'] . ' ' . $helper->correctNumber(intval($facture['multicurrency_total_ttc'])) . ' ' . $facture['multicurrency_code'] . ' ' . $printed . ' ' . $numberOfPrints . '
'; print '
'; } else { print '
'; print '
' . $name . '
'; print '
' . $langs->trans('NoDailyClosing') . '
'; print '
' . $langs->trans('BackToGroup') . '
'; print '
'; }