Beispiel #1
0
     if ($user->rights->expedition->supprimer) {
         print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=delete">' . $langs->trans("Delete") . '</a>';
     }
     print '</div>';
 }
 /*
  * Documents generated
  */
 if ($action != 'presend') {
     print '<div class="fichecenter"><div class="fichehalfleft">';
     $objectref = dol_sanitizeFileName($object->ref);
     $filedir = $conf->expedition->dir_output . "/sending/" . $objectref;
     $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
     $genallowed = $user->rights->expedition->lire;
     $delallowed = $user->rights->expedition->supprimer;
     $somethingshown = $formfile->show_documents('expedition', $objectref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
     // Linked object block
     $somethingshown = $form->showLinkedObjectBlock($object);
     // Show links to link elements
     //$linktoelem = $form->showLinkToObjectBlock($object);
     //if ($linktoelem) print '<br>'.$linktoelem;
     print '</div><div class="fichehalfright"><div class="ficheaddleft">';
     // List of actions on element
     include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
     $formactions = new FormActions($db);
     $somethingshown = $formactions->showactions($object, 'shipping', $socid);
     print '</div></div></div>';
 }
 /*
  * Action presend
  */
Beispiel #2
0
     print '</div>';
     if ($_GET['action'] != 'edit') {
         print '<table width="100%"><tr><td width="50%" valign="top">';
         print '<a name="builddoc"></a>';
         // ancre
         /*
          * Documents generes
          */
         $ref = dol_sanitizeFileName($fac->ref);
         $subdir = get_exdir($fac->id, 2) . $ref;
         $filedir = $conf->fournisseur->facture->dir_output . '/' . get_exdir($fac->id, 2) . $ref;
         $urlsource = $_SERVER['PHP_SELF'] . '?facid=' . $fac->id;
         $genallowed = $user->rights->fournisseur->facture->creer;
         $delallowed = $user->rights->fournisseur->facture->supprimer;
         print '<br>';
         $somethingshown = $formfile->show_documents('facture_fournisseur', $subdir, $filedir, $urlsource, $genallowed, $delallowed, $fac->modelpdf, 1, 0, 0, 0, 0, '', '', '', $societe->default_lang);
         $object = $fac;
         /*
          * Linked object block
          */
         $somethingshown = $object->showLinkedObjectBlock();
         print '</td><td valign="top" width="50%">';
         print '<br>';
         // List of actions on element
         include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
         $formactions = new FormActions($db);
         $somethingshown = $formactions->showactions($object, 'invoice_supplier', $socid);
         print '</td></tr></table>';
     }
 }
 /*
Beispiel #3
0
            } else {
                print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">' . $langs->trans("Delete") . '</a></div>';
            }
            print "</div>";
        }
        print '<div class="fichecenter"><div class="fichehalfleft">';
        /*
         * Documents generes
         */
        $filename = dol_sanitizeFileName($object->ref);
        $filedir = $conf->contrat->dir_output . "/" . dol_sanitizeFileName($object->ref);
        $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
        $genallowed = $user->rights->contrat->creer;
        $delallowed = $user->rights->contrat->supprimer;
        $var = true;
        $somethingshown = $formfile->show_documents('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
        // Linked object block
        $somethingshown = $form->showLinkedObjectBlock($object);
        // Show links to link elements
        $linktoelem = $form->showLinkToObjectBlock($object);
        if ($linktoelem) {
            print '<br>' . $linktoelem;
        }
        print '</div><div class="fichehalfright"><div class="ficheaddleft">';
        print '</div></div></div>';
    }
}
llxFooter();
$db->close();
?>
Beispiel #4
0
    print "</div>";
    print "<br>\n";
    if ($action != 'presend') {
        print '<div class="fichecenter"><div class="fichehalfleft">';
        print '<a name="builddoc"></a>';
        // ancre
        /*
         * Documents generes
         */
        $filename = dol_sanitizeFileName($object->ref);
        $filedir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->ref);
        $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
        $genallowed = $user->rights->projet->lire && $userAccess > 0;
        $delallowed = $user->rights->projet->creer && $userWrite > 0;
        $var = true;
        $somethingshown = $formfile->show_documents('project', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf);
        print '</div></div class="fichehalfright">';
        if (!empty($object->id)) {
            // List of actions on element
            include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
            $formactions = new FormActions($db);
            $somethingshown = $formactions->showactions($object, 'project', $socid);
        }
        print '</div>';
    }
    // Hook to add more things on page
    $parameters = array();
    $reshook = $hookmanager->executeHooks('mainCardTabAddMore', $parameters, $object, $action);
    // Note that $action and $object may have been modified by hook
}
llxFooter();
Beispiel #5
0
        if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC))
        {
            print '<table width="100%"><tr><td valign="top" width="50%">';
            print '<a name="builddoc"></a>'; // ancre

            /*
             * Documents generes
             */
            $filedir=$conf->societe->multidir_output[$object->entity].'/'.$object->id;
            $urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id;
            $genallowed=$user->rights->societe->creer;
            $delallowed=$user->rights->societe->supprimer;

            $var=true;

            $somethingshown=$formfile->show_documents('company',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$object->default_lang);

            print '</td>';
            print '<td></td>';
            print '</tr>';
            print '</table>';

            print '<br>';
        }

        // Subsidiaries list
        $result=show_subsidiaries($conf,$langs,$db,$object);

        // Contacts list
        if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
        {
Beispiel #6
0

	print '<table width="100%"><tr><td width="50%" valign="top">';

	/*
	 * Documents generes
	 */
	$filename=dol_sanitizeFileName($object->ref);
	$filedir=$conf->propale->dir_output . "/" . dol_sanitizeFileName($object->ref);
	$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
	$genallowed=0;
	$delallowed=0;

	$var=true;

	$somethingshown=$formfile->show_documents('propal',$filename,$filedir,$urlsource,$genallowed,$delallowed);


	/*
	 * Linked object block
	 */
	$somethingshown=$object->showLinkedObjectBlock();

	print '</td><td valign="top" width="50%">';

	// List of actions on element
	include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php');
	$formactions=new FormActions($db);
	$somethingshown=$formactions->showactions($object,'propal',$socid);

	print '</td></tr></table>';
    } else {
        dol_print_error($db);
    }
    dol_fiche_end();
}
/*
 * Boutons Actions
 */
print '<div class="tabsAction">';
/*if ($user->societe_id == 0 && count($accounts) == 1 && $action == 'new' && $user->rights->banque->cheque)
{
	print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=create&amp;accountid='.$account_id.'">'.$langs->trans('NewCheckReceipt').'</a>';
}*/
if ($user->societe_id == 0 && !empty($object->id) && $object->statut == 0 && $user->rights->banque->cheque) {
    print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=valide&amp;sortfield=' . $sortfield . '&amp;sortorder=' . $sortorder . '">' . $langs->trans('Valid') . '</a>';
}
if ($user->societe_id == 0 && !empty($object->id) && $user->rights->banque->cheque) {
    print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=delete&amp;sortfield=' . $sortfield . '&amp;sortorder=' . $sortorder . '">' . $langs->trans('Delete') . '</a>';
}
print '</div>';
if ($action != 'new') {
    if ($object->statut == 1) {
        $filename = dol_sanitizeFileName($object->ref);
        $filedir = $dir . get_exdir($object->number, 2, 1) . dol_sanitizeFileName($object->ref);
        $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
        $formfile->show_documents('remisecheque', $filename, $filedir, $urlsource, 1, 1);
        print '<br>';
    }
}
$db->close();
llxFooter();
		<?php 
    foreach ($shippableOrder->statusShippable as $statusdesckey => $statusdescval) {
        ?>
		<tr>
		<td><?php 
        echo $statusdescval['picto'];
        ?>
</td>
		<td><?php 
        echo $statusdescval['trans'];
        ?>
</td>
	</tr>
		<?php 
    }
    ?>
	</table>

<?php 
    if ($conf->global->SHIPPABLEORDER_GENERATE_GLOBAL_PDF) {
        print '<br><br>';
        // We disable multilang because we concat already existing pdf.
        $formfile = new FormFile($db);
        $formfile->show_documents('shippableorder', '', $diroutputpdf, $urlsource, false, true, '', 1, 1, 0, 48, 1, $param, $langs->trans("GlobalGeneratedFiles"));
    }
    $db->free($resql);
} else {
    print dol_print_error($db);
}
llxFooter();
$db->close();
Beispiel #9
0
     print "</div>";
 }
 print '<table width="100%"><tr><td width="50%" valign="top">';
 print '<a name="builddoc"></a>';
 // ancre
 /*
  * Documents	generes
  */
 $comfournref = dol_sanitizeFileName($object->ref);
 $file = $conf->fournisseur->dir_output . '/commande/' . $comfournref . '/' . $comfournref . '.pdf';
 $relativepath = $comfournref . '/' . $comfournref . '.pdf';
 $filedir = $conf->fournisseur->dir_output . '/commande/' . $comfournref;
 $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
 $genallowed = $user->rights->fournisseur->commande->creer;
 $delallowed = $user->rights->fournisseur->commande->supprimer;
 $somethingshown = $formfile->show_documents('commande_fournisseur', $comfournref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 0, 0, '', '', '', $soc->default_lang);
 $object = $object;
 /*
  * Linked object block
  */
 $somethingshown = $object->showLinkedObjectBlock();
 print '</td><td valign="top" width="50%">';
 if ($user->rights->fournisseur->commande->commander && $object->statut == 2) {
     /**
      * Commander (action=commande)
      */
     print '<br>';
     print '<form name="commande" action="fiche.php?id=' . $object->id . '&amp;action=commande" method="post">';
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     print '<input type="hidden"	name="action" value="commande">';
     print '<table class="border" width="100%">';
Beispiel #10
0
    print '<textarea rows="' . ROWS_3 . '" cols="120">' . $command . " " . $paramcrypted . '</textarea><br>' . "\n";
    print '<br>';
    // Now show to ask to run command
    print $langs->trans("YouMustRunCommandFromCommandLineAfterLoginToUser", $dolibarr_main_db_user, $dolibarr_main_db_user);
    print '<br>';
    print '<br>';
    $what = '';
}
// Si on a demande une generation
if ($what) {
    if ($errormsg) {
        print '<div class="error">' . $langs->trans("Error") . " : " . $errormsg . '</div>';
        //		print '<a href="'.DOL_URL_ROOT.$relativepatherr.'">'.$langs->trans("DownloadErrorFile").'</a><br>';
        print '<br>';
        print '<br>';
    } else {
        print '<div class="ok">';
        print $langs->trans("BackupFileSuccessfullyCreated") . '.<br>';
        print $langs->trans("YouCanDownloadBackupFile");
        print '</div>';
        print '<br>';
    }
}
$result = $formfile->show_documents('systemtools', 'backup', $conf->admin->dir_output . '/backup', $_SERVER['PHP_SELF'], 0, 1, '', 1, 0, 0, 54, 0, '', $langs->trans("PreviousDumpFiles"));
if ($result == 0) {
    print $langs->trans("NoBackupFileAvailable") . '<br>';
    print $langs->trans("ToBuildBackupFileClickHere", DOL_URL_ROOT . '/admin/tools/dolibarr_export.php') . '<br>';
}
print '<br>';
$time_end = time();
llxFooter('$Date: 2011/08/03 00:45:43 $ - $Revision: 1.45 $');
Beispiel #11
0
    if ($object->statut == 1 && round($remaintopay) == 0 && $object->paid == 0 && $user->rights->don->creer) {
        print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?rowid=' . $object->id . '&action=set_paid">' . $langs->trans("ClassifyPaid") . "</a></div>";
    }
    // Delete
    if ($user->rights->don->supprimer) {
        if ($don->statut == -1 || $don->statut == 0) {
            print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?rowid=' . $don->id . '&action=delete">' . $langs->trans("Delete") . "</a></div>";
        } else {
            print '<div class="inline-block divButAction"><a class="butActionDelete butActionRefused" href="#">' . $langs->trans("Delete") . "</a></div>";
        }
    } else {
        print '<div class="inline-block divButAction"><a class="butActionRefused" href="#">' . $langs->trans("Delete") . "</a></div>";
    }
    print "</div>";
    print '<table width="100%"><tr><td width="50%" valign="top">';
    /*
     * Documents generes
     */
    $filename = dol_sanitizeFileName($object->id);
    $filedir = $conf->don->dir_output . "/" . dol_sanitizeFileName($object->id);
    $urlsource = $_SERVER['PHP_SELF'] . '?rowid=' . $object->id;
    $genallowed = $object->statut == 2 && ($object->paid == 0 || $user->admin) && $user->rights->don->creer;
    $delallowed = $user->rights->don->supprimer;
    $var = true;
    print '<br>';
    $formfile->show_documents('donation', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf);
    print '</td><td>&nbsp;</td>';
    print '</tr></table>';
}
llxFooter();
$db->close();
Beispiel #12
0
        print $mesg;
        print '</td></tr>';
    }
    if ($sqlusedforexport && $user->admin) {
        print '<tr><td>';
        print info_admin($langs->trans("SQLUsedForExport") . ':<br> ' . $sqlusedforexport);
        print '</td></tr>';
    }
    print '</table>';
    print '<table width="100%"><tr><td width="50%">';
    if (!is_dir($conf->export->dir_temp)) {
        dol_mkdir($conf->export->dir_temp);
    }
    // Affiche liste des documents
    // NB: La fonction show_documents rescanne les modules qd genallowed=1, sinon prend $liste
    $formfile->show_documents('export', '', $conf->export->dir_temp . '/' . $user->id, $_SERVER["PHP_SELF"] . '?step=4&datatoexport=' . $datatoexport, $liste, 1, !empty($_POST['model']) ? $_POST['model'] : 'csv', 1, 1);
    print '</td><td width="50%">&nbsp;</td></tr>';
    print '</table>';
}
print '<br>';
$db->close();
llxFooter();
/**
 * 	Return table name of an alias. For this, we look for the "tablename as alias" in sql string.
 *
 * 	@param	string	$code				Alias.Fieldname
 * 	@param	string	$sqlmaxforexport	SQL request to parse
 * 	@return	string						Table name of field
 */
function getablenamefromfield($code, $sqlmaxforexport)
{
Beispiel #13
0
                print '<table width="100%"><tr><td width="50%" valign="top">';
                print '<a name="builddoc"></a>'; // ancre

                /*
                 * Documents generes
                 */

                $ref=dol_sanitizeFileName($fac->ref);
                $subdir = get_exdir($fac->id,2).$ref;
                $filedir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($fac->id,2).$ref;
                $urlsource=$_SERVER['PHP_SELF'].'?facid='.$fac->id;
                $genallowed=$user->rights->fournisseur->facture->creer;
                $delallowed=$user->rights->fournisseur->facture->supprimer;

                print '<br>';
                $somethingshown=$formfile->show_documents('facture_fournisseur',$subdir,$filedir,$urlsource,$genallowed,$delallowed,$fac->modelpdf);

                $object=$fac;

                /*
                 * Linked object block
                 */
                $somethingshown=$object->showLinkedObjectBlock();

                print '</td><td valign="top" width="50%">';
                print '<br>';

                // List of actions on element
                include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php');
                $formactions=new FormActions($db);
                $somethingshown=$formactions->showactions($object,'invoice_supplier',$socid);
Beispiel #14
0
    print "<br>\n";
}
if ($action != 'presend') {
    print '<table width="100%"><tr><td width="50%" valign="top">';
    print '<a name="builddoc"></a>';
    // ancre
    /*
     * Documents generes
     */
    $filename = dol_sanitizeFileName($object->ref);
    $filedir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
    $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
    $genallowed = $user->rights->propale->creer;
    $delallowed = $user->rights->propale->supprimer;
    $var = true;
    $somethingshown = $formfile->show_documents('propal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang, $hookmanager);
    /*
     * Linked object block
     */
    $somethingshown = $object->showLinkedObjectBlock();
    print '</td><td valign="top" width="50%">';
    // List of actions on element
    include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
    $formactions = new FormActions($db);
    $somethingshown = $formactions->showactions($object, 'propal', $socid);
    print '</td></tr></table>';
}
/*
 * Action presend
 *
 */
Beispiel #15
0
            $i++;
        }
        print "</table>";
    } else {
        dol_print_error($db);
    }
    dol_fiche_end();
}
/*
 * Boutons Actions
 */
print '<div class="tabsAction">';
if ($user->societe_id == 0 && sizeof($accounts) == 1 && $action == 'new' && $user->rights->banque->cheque) {
    print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=create&amp;accountid=' . $account_id . '">' . $langs->trans('NewCheckReceipt') . '</a>';
}
if ($user->societe_id == 0 && $remisecheque->statut == 0 && $remisecheque->id && $user->rights->banque->cheque) {
    print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $remisecheque->id . '&amp;action=valide">' . $langs->trans('Valid') . '</a>';
}
if ($user->societe_id == 0 && $remisecheque->id && $user->rights->banque->cheque) {
    print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?id=' . $remisecheque->id . '&amp;action=delete">' . $langs->trans('Delete') . '</a>';
}
print '</div>';
if ($action != 'new') {
    if ($remisecheque->statut == 1) {
        $dirchequereceipts = $dir . get_exdir($remisecheque->number, 2, 1) . $remisecheque->ref;
        $formfile->show_documents("remisecheque", $remisecheque->ref, $dirchequereceipts, $_SERVER["PHP_SELF"] . '?id=' . $remisecheque->id, 1, 1);
        print '<br>';
    }
}
$db->close();
llxFooter('$Date: 2011/08/03 00:46:28 $ - $Revision: 1.78 $');
            $i++;
        }
        print '<tr class="liste_total">';
        print '<td colspan="5" align="left">' . $langs->trans("Total") . '</td>';
        print '<td align="right"><b>' . price($total_ht) . '</b></td>';
        print '<td align="right"><b>' . price($total_tva) . '</b></td>';
        print '<td align="right"><b>' . price($total_ttc) . '</b></td>';
        print '<td align="right"><b>' . price($total_paid) . '</b></td>';
        print '<td align="right"><b>' . price($total_ttc - $total_paid) . '</b></td>';
        print '<td align="center">&nbsp;</td>';
        print '<td align="center">&nbsp;</td>';
        print "</tr>\n";
    }
    print "</table>";
    /*
     * Show list of available documents
     */
    $filedir = $diroutputpdf;
    $genallowed = $user->rights->facture->lire;
    $delallowed = $user->rights->facture->lire;
    print '<br>';
    print '<input type="hidden" name="option" value="' . $option . '">';
    // We disable multilang because we concat already existing pdf.
    $formfile->show_documents('unpaid', '', $filedir, $urlsource, $genallowed, $delallowed, '', 1, 1, 0, 48, 1, $param, $langs->trans("PDFMerge"), $langs->trans("PDFMerge"));
    print '</form>';
    $db->free($resql);
} else {
    dol_print_error($db, '');
}
llxFooter();
$db->close();
Beispiel #17
0
				print '<table class="nobordernopadding"><tr class="nocellnopadd">';
				print '<td width="100" class="nobordernopadding" nowrap="nowrap">';
				$facturestatic->ref=$obj->facnumber;
				$facturestatic->id=$obj->rowid;
				$facturestatic->type=$obj->type;
				print $facturestatic->getNomUrl(1,'');
				print '</td>';
				print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
				if ($obj->fk_statut == 1 && ! $obj->paye && $db->jdate($obj->datelimite) < ($now - $conf->facture->client->warning_delay)) print img_warning($langs->trans("Late"));
				print '</td>';
				print '<td width="16" align="right" class="nobordernopadding">';
				$filename=dol_sanitizeFileName($obj->facnumber);
				$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->facnumber);
				$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
				$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','',1,'',1);
				print '</td></tr></table>';

				print '</td>';
				print '<td align="left">';
				$thirdpartystatic->id=$obj->socid;
				$thirdpartystatic->nom=$obj->nom;
				$thirdpartystatic->client=1;
				print $thirdpartystatic->getNomUrl(1,'customer',44);
				print '</td>';
				if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total).'</td>';
				print '<td align="right">'.price($obj->total_ttc).'</td>';
				print '<td align="right">'.dol_print_date($db->jdate($obj->tms),'day').'</td>';
				print '<td>'.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3,$obj->am).'</td>';
				print '</tr>';
Beispiel #18
0
        print '<table width="100%"><tr><td width="50%" valign="top">';
        /*
         * Built documents
         */
        $filename=dol_sanitizeFileName($object->ref);
        $filedir=$conf->ficheinter->dir_output . "/".$object->ref;
        $urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
        $genallowed=$user->rights->ficheinter->creer;
        $delallowed=$user->rights->ficheinter->supprimer;
        $genallowed=1;
        $delallowed=1;

        $var=true;

        //print "<br>\n";
        $somethingshown=$formfile->show_documents('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$societe->default_lang);

    	/*
    	* Linked object block
    	*/
    	$somethingshown=$object->showLinkedObjectBlock();

    	print '</td><td valign="top" width="50%">';
    	// List of actions on element
    	include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php');
    	$formactions=new FormActions($db);
    	$somethingshown=$formactions->showactions($object,'fichinter',$socid);
        print "</td><td>";
        print "&nbsp;</td>";
        print "</tr></table>\n";
    }
Beispiel #19
0
				$propalstatic->id=$obj->propalid;
				$propalstatic->ref=$obj->ref;

				print '<table class="nobordernopadding"><tr class="nocellnopadd">';
				print '<td class="nobordernopadding" nowrap="nowrap">';
				print $propalstatic->getNomUrl(1);
				print '</td>';
				print '<td width="18" class="nobordernopadding" nowrap="nowrap">';
				if ($db->jdate($obj->dp) < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
				print '</td>';
				print '<td width="16" align="center" class="nobordernopadding">';
				$filename=dol_sanitizeFileName($obj->ref);
				$filedir=$conf->propale->dir_output . '/' . dol_sanitizeFileName($obj->ref);
				$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
				$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
				print '</td></tr></table>';

				print "</td>";

				print '<td align="left"><a href="fiche.php?socid='.$obj->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,44).'</a></td>'."\n";
				print '<td align="right">';
				print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
				print '<td align="right">'.price($obj->total_ttc).'</td>';
				print '<td align="center" width="14">'.$propalstatic->LibStatut($obj->fk_statut,3).'</td>'."\n";
				print '</tr>'."\n";
				$i++;
				$total += $obj->total_ttc;
			}
			if ($total>0) {
				print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td>&nbsp;</td></tr>";
Beispiel #20
0
            if ($action != 'prerelance' && $action != 'presend')
            {
                print '<table width="100%"><tr><td width="50%" valign="top">';
                print '<a name="builddoc"></a>'; // ancre

                /*
                 * Documents generes
                 */
                $filename=dol_sanitizeFileName($object->ref);
                $filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref);
                $urlsource=$_SERVER['PHP_SELF'].'?facid='.$object->id;
                $genallowed=$user->rights->facture->creer;
                $delallowed=$user->rights->facture->supprimer;

                print '<br>';
                $somethingshown=$formfile->show_documents('facture',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang,$object->hooks);

                /*
                 * Linked object block
                 */
                $somethingshown=$object->showLinkedObjectBlock();

                print '</td><td valign="top" width="50%">';

                print '<br>';

                // List of actions on element
                include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php');
                $formactions=new FormActions($db);
                $somethingshown=$formactions->showactions($object,'invoice',$socid);
Beispiel #21
0
 print '<table class="nobordernopadding"><tr class="nocellnopadd">';
 // Ref
 print '<td width="100" class="nobordernopadding" nowrap="nowrap">';
 print $facturestatic->getNomUrl(1);
 print '</td>';
 // Warning picto
 print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
 if ($date_limit < $now - $conf->facture->client->warning_delay && !$objp->paye && $objp->fk_statut == 1) {
     print img_warning($langs->trans("Late"));
 }
 print '</td>';
 // PDF Picto
 print '<td width="16" align="right" class="nobordernopadding">';
 $filename = dol_sanitizeFileName($objp->facnumber);
 $filedir = $conf->facture->dir_output . '/' . dol_sanitizeFileName($objp->facnumber);
 $foundpdf = $formfile->show_documents('facture', $filename, $filedir, $urlsource, '', '', '', 1, '', 1, $param);
 print '</td>';
 print '</tr></table>';
 print "</td>\n";
 print '<td nowrap align="center">' . dol_print_date($db->jdate($objp->df), 'day') . '</td>' . "\n";
 print '<td nowrap align="center">' . dol_print_date($db->jdate($objp->datelimite), 'day') . '</td>' . "\n";
 print '<td><a href="' . DOL_URL_ROOT . '/comm/fiche.php?socid=' . $objp->socid . '">' . img_object($langs->trans("ShowCompany"), "company") . ' ' . dol_trunc($objp->nom, 28) . '</a></td>';
 print '<td align="right">' . price($objp->total_ht) . '</td>';
 print '<td align="right">' . price($objp->total_ttc) . '</td>';
 print '<td align="right">' . price($objp->am) . '</td>';
 if ($objp->am == 0) {
     print '<td align="right"></td>';
 } else {
     print '<td align="right">' . price($objp->total_ttc - $objp->am) . '</td>';
 }
 // Affiche statut de la facture
Beispiel #22
0
 if ($action != 'presend') {
     print '<table width="100%"><tr><td width="50%" valign="top">';
     print '<a name="builddoc"></a>';
     // ancre
     /*
      * Documents generes
      *
      */
     $comref = dol_sanitizeFileName($object->ref);
     $file = $conf->commande->dir_output . '/' . $comref . '/' . $comref . '.pdf';
     $relativepath = $comref . '/' . $comref . '.pdf';
     $filedir = $conf->commande->dir_output . '/' . $comref;
     $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
     $genallowed = $user->rights->commande->creer;
     $delallowed = $user->rights->commande->supprimer;
     $somethingshown = $formfile->show_documents('commande', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang, $object->hooks);
     /*
      * Linked object block
      */
     $somethingshown = $object->showLinkedObjectBlock();
     print '</td><td valign="top" width="50%">';
     // List of actions on element
     include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
     $formactions = new FormActions($db);
     $somethingshown = $formactions->showactions($object, 'order', $socid);
     print '</td></tr></table>';
 }
 /*
  * Action presend
  *
  */
    if ($don->statut == 1 && $resteapayer > 0) {
        print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?rowid=' . $don->id . '&action=create">' . $langs->trans("DoPayment") . "</a></div>";
    }
    if ($don->statut == 1 && $resteapayer == 0 && $don->paye == 0) {
        print '<div class="inline-block divButAction"><a class="butAction" href="fiche.php?rowid=' . $don->id . '&action=set_paid">' . $langs->trans("ClassifyPaid") . "</a></div>";
    }
    if ($user->rights->don->supprimer) {
        print '<div class="inline-block divButAction"><a class="butActionDelete" href="fiche.php?rowid=' . $don->id . '&action=delete">' . $langs->trans("Delete") . "</a></div>";
    } else {
        print '<div class="inline-block divButAction"><a class="butActionRefused" href="#">' . $langs->trans("Delete") . "</a></div>";
    }
    print "</div>";
    print '<table width="100%"><tr><td width="50%" valign="top">';
    /*
     * Documents generes
     */
    $filename = dol_sanitizeFileName($don->id);
    $filedir = $conf->don->dir_output . '/' . get_exdir($filename, 2);
    $urlsource = $_SERVER['PHP_SELF'] . '?rowid=' . $don->id;
    //            $genallowed=($fac->statut == 1 && ($fac->paye == 0 || $user->admin) && $user->rights->facture->creer);
    //            $delallowed=$user->rights->facture->supprimer;
    $genallowed = 1;
    $delallowed = 0;
    $var = true;
    print '<br>';
    $formfile->show_documents('donation', $filename, $filedir, $urlsource, $genallowed, $delallowed);
    print '</td><td>&nbsp;</td>';
    print '</tr></table>';
}
llxFooter();
$db->close();
Beispiel #24
0
    print '</table>';
    print '</div>';
    print '<table width="100%">';
    if ($sqlusedforexport && $user->admin) {
        print '<tr><td>';
        print info_admin($langs->trans("SQLUsedForExport") . ':<br> ' . $sqlusedforexport);
        print '</td></tr>';
    }
    print '</table>';
    print '<table width="100%"><tr><td width="50%">';
    if (!is_dir($conf->export->dir_temp)) {
        dol_mkdir($conf->export->dir_temp);
    }
    // Affiche liste des documents
    // NB: La fonction show_documents rescanne les modules qd genallowed=1, sinon prend $liste
    $formfile->show_documents('export', '', $upload_dir, $_SERVER["PHP_SELF"] . '?step=5&datatoexport=' . $datatoexport, $liste, 1, !empty($_POST['model']) ? $_POST['model'] : 'csv', 1, 1);
    print '</td><td width="50%">&nbsp;</td></tr>';
    print '</table>';
}
print '<br>';
llxFooter();
$db->close();
exit;
// don't know why but apache hangs with php 5.3.10-1ubuntu3.12 and apache 2.2.2 if i remove this exit or replace with return
/**
 * 	Return table name of an alias. For this, we look for the "tablename as alias" in sql string.
 *
 * 	@param	string	$code				Alias.Fieldname
 * 	@param	string	$sqlmaxforexport	SQL request to parse
 * 	@return	string						Table name of field
 */
Beispiel #25
0
			print "\n";

			print '<table width="100%" cellspacing="2"><tr><td width="50%" valign="top">';

			/*
		 	 * Documents generated
			 */

			$deliveryref = dol_sanitizeFileName($delivery->ref);
			$filedir = $conf->expedition->dir_output . "/receipt/" . $deliveryref;
			$urlsource = $_SERVER["PHP_SELF"]."?id=".$delivery->id;

			$genallowed=$user->rights->expedition->livraison->creer;
			$delallowed=$user->rights->expedition->livraison->supprimer;

			$somethingshown=$formfile->show_documents('livraison',$deliveryref,$filedir,$urlsource,$genallowed,$delallowed,$delivery->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
			if ($genallowed && ! $somethingshown) $somethingshown=1;

			print '</td><td valign="top" width="50%">';

			// Rien a droite

			print '</td></tr></table>';

			if ($expedition->origin_id)
			{
				print '<br>';
				//show_list_sending_receive($expedition->origin,$expedition->origin_id," AND e.rowid <> ".$expedition->id);
				show_list_sending_receive($expedition->origin,$expedition->origin_id);
			}
		}
        print '<td align="center">&nbsp;</td>';
        print "</tr>\n";
    }
    print "</table>";
    if (empty($mode)) {
        /*
         * Show list of available documents
         */
        $filedir = $diroutputpdf;
        $genallowed = $user->rights->facture->lire;
        $delallowed = $user->rights->facture->lire;
        print '<br>';
        print '<input type="hidden" name="option" value="' . $option . '">';
        // We disable multilang because we concat already existing pdf.
        //echo $filedir;exit;
        $formfile->show_documents('lcr', '', $filedir, $urlsource, $genallowed, $delallowed, '', 1, 1, 0, 48, 1, $param, $langs->trans("Fichier LCR générés"), $langs->trans("Fusion LCR"));
        ?>
		
			<script type="text/javascript">
				
				$("#builddoc_generatebutton").parent().append(' <input class="button" type="SUBMIT" name="generateCSV" value="Générer CSV">');
				
			</script>
		
		<?php 
    } else {
        if ($action != 'presend') {
            print '<div class="tabsAction">';
            print '<a href="' . $_SERVER["PHP_SELF"] . '?mode=sendremind&action=presend" class="butAction" name="buttonsendremind" value="' . dol_escape_htmltag($langs->trans("SendRemind")) . '">' . $langs->trans("SendRemind") . '</a>';
            print '</div>';
            print '<br>';