示例#1
0
$printer_bvr->function_id = $user->function_id;
$printer_bvr->label = "bvr";
$printer_bvr->loadMatchingObject();
if (!$printer_bvr->_id) {
    CAppUI::setMsg("Les imprimantes ne sont pas paramétrées", UI_MSG_ERROR);
    echo CAppUI::getMsg();
    return false;
} else {
    $file = new CFile();
    $file->object_id = $journal->checklist_id;
    $file->object_class = "CJournalBill";
    $file->loadMatchingObject();
    $printer_bvr->loadRefSource()->sendDocument($file);
}
if (!$uniq_checklist) {
    $factures = $journal->loadRefsFacture();
    if (count($factures)) {
        $printer_justif = new CPrinter();
        $printer_justif->function_id = $user->function_id;
        $printer_justif->label = "justif";
        $printer_justif->loadMatchingObject();
        if (!$printer_justif->_id) {
            CAppUI::setMsg("Les imprimantes ne sont pas paramétrées", UI_MSG_ERROR);
            echo CAppUI::getMsg();
            return false;
        }
        $file = new CFile();
        foreach ($factures as $facture) {
            $facture_pdf = new CEditPdf();
            $facture_pdf->factures = array($facture);
            $pdf = "";