Ignore:
Timestamp:
Sep 30, 2015, 11:55:11 PM (9 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Finance/Bill.php

    r747 r748  
    5252  function GenerateHTML()
    5353  {
    54     $DbResult = $this->Database->query('SELECT `FinanceInvoice`.*, `FinanceInvoiceGroup`.`Direction` FROM `FinanceInvoice` '.
     54    $Finance = &$this->System->Modules['Finance'];
     55    $Finance->LoadMonthParameters(0);
     56
     57    $DbResult = $this->Database->query('SELECT `FinanceInvoice`.*, `FinanceInvoiceGroup`.`Direction`, `DocumentLineCode`.`Name` AS `BillName` FROM `FinanceInvoice` '.
    5558      'LEFT JOIN `FinanceInvoiceGroup` ON `FinanceInvoiceGroup`.`Id`=`FinanceInvoice`.`Group` '.
     59      'LEFT JOIN `DocumentLineCode` ON `DocumentLineCode`.`Id`=`FinanceInvoice`.`BillCode` '.
    5660      'WHERE `FinanceInvoice`.`Id`='.$this->InvoiceId);
    5761    $Invoice = $DbResult->fetch_assoc();
     
    7276    $SubjectFrom['Account'] = $SubjectFromAccount['NumberFull'];
    7377
    74     $Dodavka = array();
    7578    $InvoiceItems = array();
    76     $DbResult = $this->Database->select('FinanceInvoiceItem', '*, CEIL(`Price` * `Quantity`) AS `Total`', '`FinanceInvoice`='.$this->InvoiceId);
     79    $DbResult = $this->Database->select('FinanceInvoiceItem', '*, ROUND(`Price` * `Quantity`, '.$Finance->Rounding.') AS `Total`', '`FinanceInvoice`='.$this->InvoiceId);
    7780    while($Item = $DbResult->fetch_assoc())
    7881    {
     
    108111      '<tr><td width="50%" valign="top">'.
    109112      '<strong>Platební podmínky:</strong><br>'.
    110       'Číslo dokladu: '.$Invoice['BillCode'].'<br>'.
     113      'Číslo dokladu: '.$Invoice['BillName'].'<br>'.
    111114      'Variabilní symbol: '.$VarSym.'<br>'.
    112115      'Specifický symbol: '.$this->SpecificSymbol.'<br>'.
     
    153156  function GenerateHTML()
    154157  {
    155     $DbResult = $this->Database->query('SELECT `FinanceOperation`.*, `FinanceOperationGroup`.`Direction` FROM `FinanceOperation` '.
     158    $DbResult = $this->Database->query('SELECT `FinanceOperation`.*, `FinanceOperationGroup`.`Direction`, `DocumentLineCode`.`Name` AS `BillName` FROM `FinanceOperation` '.
    156159      'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id`=`FinanceOperation`.`Group` '.
     160      'LEFT JOIN `DocumentLineCode` ON `DocumentLineCode`.`Id`=`FinanceOperation`.`BillCode` '.
    157161      'WHERE `FinanceOperation`.`Id`='.$this->OperationId);
    158162    $Operation = $DbResult->fetch_assoc();
     
    195199      '</td><td width="50%" valign="top">'.
    196200      '<font size="5"><strong>'.$Desc['Type'].' POKLADNÍ DOKLAD</strong></font><br><br>'.
    197       'Číslo dokladu: '.$Operation['BillCode'].'<br>'.
     201      'Číslo dokladu: '.$Operation['BillName'].'<br>'.
    198202      'Datum vystavení: '.HumanDate($Operation['Time']).'<br>'.
    199203      '</td></tr>'.
Note: See TracChangeset for help on using the changeset viewer.