$pdf->SetFont($PDFFont, 'BU'); $pdf->Row(array($a['offer_amount'] . ':', Format_Number($TotalAmount) . ' ' . $Currency)); } else { if (isset($Type) && $Type == 'Invoice_Ledger_Summary') { $pdf->SetFont($PDFFont, 'BU'); $pdf->Row(array($a['invoice_amount'] . ':', Format_Number($TotalInvoiceSum) . ' ' . $Currency)); $pdf->SetFont($PDFFont, 'U'); $pdf->Row(array($a['open_account'] . ':', Format_Number($TotalInvoiceOpenAmount) . ' ' . $Currency)); } else { if (isset($Type) && $Type == 'Position_Sales') { $pdf->SetFont($PDFFont, 'BU'); $pdf->Row(array($a['invoice_amount'] . ':', Format_Number($TotalAmount) . ' ' . $Currency)); } else { if (isset($Type) && $Type == 'Position_Sales_Summary') { $pdf->SetFont($PDFFont, 'BU'); $pdf->Row(array($a['invoice_amount'] . ':', Format_Number($TotalPosAmount) . ' ' . $Currency)); } } } } } } } $pdf->SetFont($PDFFont, '', $PDFFontsize2); $pdf->Ln(5); // PDF Subject, Creator etc. // $pdf->SetTitle($Subject); $pdf->SetSubject($Subject); $pdf->SetAuthor($CompanyName); $pdf->SetCreator($a['programname']);
/** * Smarty number_format modifier plugin * * Type: modifier * Name: number_format * Purpose: format number via Format_Number in phprechnung.inc.php */ function smarty_modifier_number_format($number) { return Format_Number($number); }
} else { $Pos_Quantity = ""; } if ($posresult['POS_PRICE'] != 0) { $Pos_Price = Format_Number($posresult['POS_PRICE']); } else { $Pos_Price = ""; } if ($posresult['POS_PRICE'] != 0) { $Pos_Tax = $posresult['TAX_DESC']; } else { $Pos_Tax = ""; } $Pos_Sum = $posresult['POS_PRICE'] * $posresult['POS_QUANTITY']; if ($Pos_Sum != 0) { $Pos_Sum = Format_Number($Pos_Sum); } else { $Pos_Sum = ""; } if ($Type == 'DeliveryNote') { if ($PrintPositionName == "1") { $pdf->SetWidths(array(25, 140, 30)); $pdf->SetAligns(array('L', 'L', 'R')); $pdf->Row(array($posresult['POS_NAME'], $posresult['POS_DESC'], $Pos_Quantity)); } else { $pdf->SetWidths(array(165, 30)); $pdf->SetAligns(array('L', 'R')); $pdf->Row(array($posresult['POS_DESC'], $Pos_Quantity)); } } else { if ($PrintPositionName == "1") {
// if (isset($tmpPos) && $tmpPos == '1') { $pdf->Row(array($a['invoice_amount'] . ' ' . $Currency . ':', Format_Number($TOTAL_AMOUNT))); } else { $pdf->Row(array($a['invoice_amount'] . ' ' . $Currency . ':', Format_Number($TOTAL))); } } // Total sum paid // if (isset($SUM_PAID) && $SUM_PAID > 0) { $pdf->SetFont($PDFFont, '', $PDFFontsize2); $pdf->SetWidths(array(195)); $pdf->SetAligns(array('L')); $pdf->Row(array($a['transaction'] . ':')); foreach ($paid as $paidresult) { $pdf->Row(array($paidresult['PAYMENT_DATE'] . ' [ ' . $paidresult['METHOD_OF_PAY'] . ' ]' . ' ' . Format_Number($paidresult['SUM_PAID']) . ' ' . $Currency)); } } } $pdf->Ln(5); // Message // $pdf->SetFont($PDFFont, '', $PDFFontsize1); $pdf->SetWidths(array(195)); $pdf->SetAligns(array('C')); if (isset($MESSAGEID)) { $pdf->Row(array($MESSAGEID)); } // PDF Subject, Creator etc. // $pdf->SetTitle($Subject);
} else { if (isset($Type) && $Type == 'Position_Sales') { $pdf->SetWidths(array(25, 85, 25, 30, 30)); $pdf->SetAligns(array('L', 'L', 'R', 'R', 'R')); $pdf->SetFont($PDFFont, '', $PDFFontsize2); $pdf->SetTextColor(0, 0, 0); $pdf->Row(array($posresult['POS_NAME'], $posresult['POS_DESC'], $posresult['POS_QUANTITY'], Format_Number($posresult['POS_PRICE']), Format_Number($posresult['POS_QUANTITY'] * $posresult['POS_PRICE']))); $TotalAmount += $posresult['POS_QUANTITY'] * $posresult['POS_PRICE']; } else { if (isset($Type) && $Type == 'Position_Sales_Summary') { $pdf->SetWidths(array(25, 100, 25, 45)); $pdf->SetAligns(array('L', 'L', 'R', 'R')); $pdf->SetFont($PDFFont, '', $PDFFontsize2); $pdf->SetTextColor(0, 0, 0); $Percentage = Format_Number($posresult['POS_AMOUNT'] / $TotalPosAmount * 100); $pdf->Row(array($posresult['POS_NAME'], $posresult['POS_DESC'], $posresult['POS_QUANTITY'], Format_Number($posresult['POS_AMOUNT']) . ' (' . $Percentage . '%)')); } } } } } } } } $pdf->SetFont($PDFFont, '', $PDFFontsize2); $pdf->SetTextColor(0, 0, 0); } } if (isset($Type) && $Type == 'Cashbook') { $StartingWith2 = 0; $TotalTakings2 = 0;