dailyclosing_json.tpl.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. print '<tr><td colspan="4" class="dailyClosingHeader">' . $name . '</td></tr>';
  3. print '<tr><td colspan="4">' . $langs->trans('UserGroupName') . ': <b>' . $JSON->block1->groupuser_name . '</b></td></tr>
  4. <tr><td colspan="4">' . $langs->trans('ToolGroupName') . ': <b> ' . $JSON->block1->grouptool_name . '</b></td></tr>
  5. <tr><td colspan="4">' . $langs->trans('PackageName') . ': <b>' . $JSON->block1->package_name . '</b></td></tr>
  6. &nbsp;<tr><td style="text-align: center; background-color: lightgrey;" colspan="4">' . $langs->trans('DevicesList') . '</td></tr>
  7. <tr style="height: 25px; text-align: center; background-color: lightgrey;"><td style="width:200px;">Device name</td><td style="width:350px;">Device type</td><td colspan="2" class="fields" style="text-align: center; background-color: rgb(163, 0, 51); color:white;">' . $langs->trans('Withholding') . '</td></tr>';
  8. if (isset($JSON->block2)) {
  9. foreach ($JSON->block2 as $device) {
  10. $whAmount = $device->withholding != '' ? $device->withholding . ' HUF' : '';
  11. print '<tr style="height: 35px;"><td style="width:200px;">' . $device->ref . '</td><td style="width:350px;">' . $device->title . '</td><td colspan="2" class="fields" style="text-align: center;">' . $whAmount . '</td></tr>';
  12. }
  13. }
  14. if (isset($JSON->additionals)) {
  15. foreach ($JSON->additionals as $additionalKey => $additionalValue) {
  16. $whAmountAdditionals = $additionalValue->withholding != '' ? $additionalValue->withholding . ' HUF' : '';
  17. print '<tr style="height: 35px;"><td style="width:200px;">' . $helper->getAdditionalTitle($additionalKey) . '</td><td style="width:350px;">' . $additionalValue->pieces . '</td><td colspan="2" class="fields" style="text-align: center;">' . $whAmountAdditionals . '</td></tr>';
  18. }
  19. }
  20. if (isset($JSON->block3)) {
  21. foreach ($JSON->block3 as $changeKey => $changeValue) {
  22. print '<tr style="height: 35px;"><td style="width:200px;">Change ' . $changeKey . '</td><td style="width:350px;">' . $changeValue . ' ' . $changeKey . '</td><td class="fields"></td></tr>';
  23. }
  24. }
  25. print '<tr><td style="text-align: center; background-color: lightgrey;" colspan="2">' . $langs->trans('DailyIncomeCash') . '</td><td style="text-align: center; background-color: rgb(163, 0, 51); color:white;" colspan="2">' . $langs->trans('Withhold') . '</td></tr>';
  26. $WHHUF = isset($JSON->block4->WHHUFcash) ? $JSON->block4->WHHUFcash . ' HUF' : '';
  27. print '<tr style="height: 35px;"><td style="width:200px;">' . $langs->trans('DailyIncomeCash') . ' HUF:</td><td style="width:350px; color:green; font-weight: bold;">' . $helper->correctNumber($JSON->block4->HUFcash) . ' HUF</td><td colspan="2" style="text-align: center;">' . $WHHUF . '</td></tr>';
  28. $WHEUR = isset($JSON->block4->WHEURcash) ? $JSON->block4->WHEURcash . ' HUF' : '';
  29. print '<tr style="height: 35px;"><td style="width:200px;">' . $langs->trans('DailyIncomeCash') . ' EUR:</td><td style="width:350px; color:green; font-weight: bold;">' . $helper->correctNumber($JSON->block4->EURcash) . ' EUR</td><td colspan="2" style="text-align: center;">' . $WHEUR . '</td></tr>';
  30. print '<tr><td style="text-align: center; background-color: lightgrey;" colspan="4">' . $langs->trans('DailyIncomeCard') . '</td></tr>';
  31. $WHHUF = isset($JSON->block4->WHHUFcash) ? $JSON->block4->WHHUFcash . ' HUF' : '';
  32. print '<tr style="height: 35px;"><td style="width:200px;">' . $langs->trans('DailyIncomeCard') . ' HUF:</td><td style="width:350px; color:green; font-weight: bold;">' . $helper->correctNumber($JSON->block4->HUFcard) . ' HUF</td></tr>';
  33. $WHEUR = isset($JSON->block4->WHEURcash) ? $JSON->block4->WHEURcash . ' HUF' : '';
  34. print '<tr style="height: 35px;"><td style="width:200px;">' . $langs->trans('DailyIncomeCard') . ' EUR:</td><td style="width:350px; color:green; font-weight: bold;">' . $helper->correctNumber($JSON->block4->EURcard) . ' EUR</td></tr>';
  35. print '<tr><td colspan="4"><table style="width: 100%;">';
  36. print '<tr><td style="text-align: center; background-color: lightgrey;" colspan="4">' . $langs->trans('TotalAmountCash') . '</td></tr>';
  37. print '<tr style="text-align: center;"><td style="width:100px;">&nbsp;</td><td>' . $langs->trans('DailyIncomeCash') . '</td><td>' . $langs->trans('Change') . '</td><td>' . $langs->trans('TotalAmountCash') . '</td></tr>';
  38. print '<tr style="height: 35px;"><td style="width:200px;"> HUF:</td></td><td style="text-align: center;">' . $helper->correctNumber($JSON->block4->HUFcash) . ' HUF </td><td style="text-align: center;"> '. $helper->correctNumber(intval($JSON->block3->HUF)) . ' HUF </td><td style="text-align: center;"> <b>' . $helper->correctNumber(intval($JSON->block4->HUFcash) + intval($JSON->block3->HUF)) . ' HUF</b></td></tr>';
  39. print '<tr style="height: 35px;"><td style="width:200px;"> EUR:</td></td><td style="text-align: center;">' . $helper->correctNumber($JSON->block4->EURcash) . ' EUR </td><td style="text-align: center;"> ' . $helper->correctNumber(intval($JSON->block3->EUR)) . ' EUR </td><td style="text-align: center;"> <b>' . $helper->correctNumber(intval($JSON->block4->EURcash) + intval($JSON->block3->EUR)) . ' EUR</b></td></tr>';
  40. print '</table></td></tr>';
  41. print '<tr><td colspan="4"><table style="width: 100%;">';
  42. print '<tr><td style="text-align: center; background-color: lightgrey;" colspan="4">' . $langs->trans('TotalAmount') . '</td></tr>';
  43. print '<tr style="text-align: center;"><td style="width:100px;">&nbsp;</td><td>' . $langs->trans('DailyIncomeCash') . '</td><td>' . $langs->trans('DailyIncomeCard') . '</td><td>' . $langs->trans('TotalAmount') . '</td></tr>';
  44. print '<tr style="height: 35px;"><td style="width:200px;"> HUF:</td><td style="text-align: center;">' . $helper->correctNumber($JSON->block4->HUFcash) . ' HUF </td><td style="text-align: center;"> ' . $helper->correctNumber($JSON->block4->HUFcard) . ' HUF </td><td style="text-align: center;"> <b>' . $helper->correctNumber(intval($JSON->block4->HUFcash) + intval($JSON->block4->HUFcard)) . ' HUF</b></td></tr>';
  45. print '<tr style="height: 35px;"><td style="width:200px;"> EUR:</td><td style="text-align: center;">' . $helper->correctNumber($JSON->block4->EURcash) . ' EUR </td><td style="text-align: center;"> ' . $helper->correctNumber($JSON->block4->EURcard) . ' EUR </td><td style="text-align: center;"> <b>' . $helper->correctNumber(intval($JSON->block4->EURcash) + intval($JSON->block4->EURcard)) . ' EUR</b></td></tr>';
  46. print '</table></td></tr>';
  47. print '</table>&nbsp;';
  48. #
  49. # Print buttons
  50. #
  51. print '<div style="width: 50%; height: 50px; display:block;">';
  52. if (isset($Block1stDataClosed->delivery_pdf)) {
  53. print '<div style="float:left;"><a href="/document.php?modulepart=settlements&file=pdf/' . basename($Block1stDataClosed->delivery_pdf) . '&entity=1" target="_blank" class="printbutton">' . $langs->trans('PrintDelivery') . '</a></div>';
  54. }
  55. if (isset($Block1stDataClosed->income_pdf)) {
  56. print '<div style="float:right;"><a href="/document.php?modulepart=settlements&file=pdf/' . basename($Block1stDataClosed->income_pdf) . '&entity=1" target="_blank" class="printbutton">' . $langs->trans('PrintIncome') . '</a></div>';
  57. }
  58. print '</div>
  59. </div>';
  60. // End of page
  61. ?>