Beispiel #1
0
 print '<br>';
 // Select mail models is same action as presend
 if (GETPOST('modelselected')) {
     $action = 'presend';
 }
 if ($action != 'prerelance' && $action != 'presend') {
     print '<div class="fichecenter"><div class="fichehalfleft">';
     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 $formfile->showdocuments('facture', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
     $somethingshown = $formfile->numoffiles;
     // Linked object block
     $somethingshown = $form->showLinkedObjectBlock($object);
     // Show links to link elements
     $linktoelem = $form->showLinkToObjectBlock($object, array('order'));
     if ($linktoelem) {
         print '<br>' . $linktoelem;
     }
     // Link for paypal payment
     if (!empty($conf->paypal->enabled) && $object->statut != 0) {
         include_once DOL_DOCUMENT_ROOT . '/paypal/lib/paypal.lib.php';
         print showPaypalPaymentUrl('invoice', $object->ref);
     }
     print '</div><div class="fichehalfright"><div class="ficheaddleft">';
     // List of actions on element
Beispiel #2
0
 print '<br>';
 if ($action != 'edit') {
     print '<div class="fichecenter"><div class="fichehalfleft">';
     //print '<table width="100%"><tr><td width="50%" valign="top">';
     //print '<a name="builddoc"></a>'; // ancre
     /*
      * Documents generes
      */
     $ref = dol_sanitizeFileName($object->ref);
     $subdir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier') . $ref;
     $filedir = $conf->fournisseur->facture->dir_output . '/' . get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier') . $ref;
     $urlsource = $_SERVER['PHP_SELF'] . '?id=' . $object->id;
     $genallowed = $user->rights->fournisseur->facture->creer;
     $delallowed = $user->rights->fournisseur->facture->supprimer;
     $modelpdf = !empty($object->modelpdf) ? $object->modelpdf : (empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF) ? '' : $conf->global->INVOICE_SUPPLIER_ADDON_PDF);
     print $formfile->showdocuments('facture_fournisseur', $subdir, $filedir, $urlsource, $genallowed, $delallowed, $modelpdf, 1, 0, 0, 40, 0, '', '', '', $societe->default_lang);
     $somethingshown = $formfile->numoffiles;
     // Linked object block
     $somethingshown = $form->showLinkedObjectBlock($object);
     // Show links to link elements
     $linktoelem = $form->showLinkToObjectBlock($object, array('supplier_order'));
     if ($linktoelem) {
         print '<br>' . $linktoelem;
     }
     print '</div><div class="fichehalfright"><div class="ficheaddleft">';
     //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 "</div>";
 }
 print "<br>";
 print '<div class="fichecenter"><div class="fichehalfleft">';
 /*
  * 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;
 print $formfile->showdocuments('commande_fournisseur', $comfournref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 0, 0, '', '', '', $object->thirdparty->default_lang);
 $somethingshown = $formfile->numoffiles;
 /*
  * Linked object block
  */
 $somethingshown = $object->showLinkedObjectBlock();
 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, 'order_supplier', $socid);
 if ($user->rights->fournisseur->commande->commander && $object->statut == 2) {
     /*
      * Commander (action=commande)
      */
     print '<br>';
Beispiel #4
0
     * 	ET user à droit "supprimer"
     *	Afficher : "Supprimer"
     */
    if ($user->rights->expensereport->supprimer && $object->fk_statut == 4) {
        if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) {
            // Brouillonner
            print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=brouillonner&id=' . $object->id . '">' . $langs->trans('ReOpen') . '</a>';
        }
        // Delete
        print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $object->id . '">' . $langs->trans('Delete') . '</a>';
    }
}
print '</div>';
//$conf->global->DOL_URL_ROOT_DOCUMENT_PHP=dol_buildpath('/expensereport/documentwrapper.php',1);
print '<div style="width:50%">';
/*
 * Generate documents
 */
if ($user->rights->expensereport->export && $object->fk_statut > 0 && $action != 'edit') {
    $filename = dol_sanitizeFileName($object->ref);
    $filedir = $conf->expensereport->dir_output . "/" . dol_sanitizeFileName($object->ref);
    $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
    $genallowed = 1;
    $delallowed = 1;
    $var = true;
    print $formfile->showdocuments('expensereport', $filename, $filedir, $urlsource, $genallowed, $delallowed);
    $somethingshown = $formfile->numoffiles;
}
print '</div>';
llxFooter();
$db->close();
Beispiel #5
0
     print $formmail->get_form();
     print '<br>';
 } else {
     if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC)) {
         print '<div class="fichecenter"><div class="fichehalfleft">';
         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;
         print $formfile->showdocuments('company', $object->id, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 0, 0, 0, 28, 0, '', 0, '', $object->default_lang);
         print '</div><div class="fichehalfright"><div class="ficheaddleft">';
         print '</div></div></div>';
         print '<br>';
     }
     print '<div class="fichecenter"><br></div>';
     // Subsidiaries list
     $result = show_subsidiaries($conf, $langs, $db, $object);
     // Contacts list
     if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) {
         $result = show_contacts($conf, $langs, $db, $object, $_SERVER["PHP_SELF"] . '?socid=' . $object->id);
     }
     // Addresses list
     if (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)) {
         $result = show_addresses($conf, $langs, $db, $object, $_SERVER["PHP_SELF"] . '?socid=' . $object->id);
     }