Example #1
0
$html = new Form($db);

if ($id > 0 || ! empty($ref))
{
	$soc = new Societe($db, $commande->socid);
	$soc->fetch($commande->socid);

	$head = commande_prepare_head($commande);

	dol_fiche_head($head, 'note', $langs->trans("CustomerOrder"), 0, 'order');

	print '<table class="border" width="100%">';

	// Ref
	print '<tr><td width="18%">'.$langs->trans("Ref").'</td><td colspan="3">';
	print $html->showrefnav($commande,'ref','',1,'ref','ref');
	print "</td></tr>";

	// Ref commande client
	print '<tr><td>';
	print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
	print $langs->trans('RefCustomer').'</td><td align="left">';
	print '</td>';
	print '</tr></table>';
	print '</td><td colspan="3">';
	print $commande->ref_client;
	print '</td>';
	print '</tr>';

	// Customer
	print "<tr><td>".$langs->trans("Company")."</td>";
Example #2
0
llxHeader('', $langs->trans("ThirdParty") . ' - ' . $langs->trans("Notes"), $help_url);
if ($id > 0) {
    /*
     * Affichage onglets
     */
    if (!empty($conf->notification->enabled)) {
        $langs->load("mails");
    }
    $head = societe_prepare_head($object);
    dol_fiche_head($head, 'note', $langs->trans("ThirdParty"), 0, 'company');
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<table class="border" width="100%">';
    print '<tr><td width="25%">' . $langs->trans('ThirdPartyName') . '</td>';
    print '<td colspan="3">';
    print $form->showrefnav($object, 'socid', '', $user->societe_id ? 0 : 1, 'rowid', 'nom');
    print '</td></tr>';
    // Alias names (commercial, trademark or alias names)
    print '<tr><td>' . $langs->trans('AliasNames') . '</td><td colspan="3">';
    print $object->name_alias;
    print "</td></tr>";
    if (!empty($conf->global->SOCIETE_USEPREFIX)) {
        print '<tr><td>' . $langs->trans('Prefix') . '</td><td colspan="3">' . $object->prefix_comm . '</td></tr>';
    }
    if ($object->client) {
        print '<tr><td>';
        print $langs->trans('CustomerCode') . '</td><td colspan="3">';
        print $object->code_client;
        if ($object->check_codeclient() != 0) {
            print ' <font class="error">(' . $langs->trans("WrongCustomerCode") . ')</font>';
        }
Example #3
0
 *  View
 */
$form = new Form($db);
llxHeader('', $langs->trans("LoanArea") . ' - ' . $langs->trans("Notes"), '');
if ($id > 0) {
    /*
     * Affichage onglets
     */
    $head = loan_prepare_head($object);
    dol_fiche_head($head, 'note', $langs->trans("Loan"), 0, 'loan');
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<table class="border" width="100%">';
    // Ref
    print '<tr><td width="25%">' . $langs->trans('Ref') . '</td>';
    print '<td colspan="3">';
    print $form->showrefnav($object, 'id', '', '', 'rowid', 'ref');
    print '</td></tr>';
    // Name
    print '<tr><td width="20%">' . $langs->trans("Name") . '</td>';
    print '<td colspan="3">' . $object->label . '</td></tr>';
    print "</table>";
    print '<br>';
    $colwidth = '25';
    $permission = $user->rights->loan->write;
    // Used by the include of notes.tpl.php
    include DOL_DOCUMENT_ROOT . '/core/tpl/notes.tpl.php';
    dol_fiche_end();
}
llxFooter();
$db->close();
Example #4
0
if ($socid > 0) {
    // On recupere les donnees societes par l'objet
    $objsoc = new Societe($db);
    $objsoc->id = $socid;
    $objsoc->fetch($socid);
    $head = societe_prepare_head($objsoc);
    print '<form method="POST" action="remise.php?id=' . $objsoc->id . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="setremise">';
    print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
    dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty"), 0, 'company');
    print '<table class="border" width="100%">';
    // Name
    print '<tr><td colspan="2" width="25%">' . $langs->trans('Name') . '</td>';
    print '<td colspan="2">';
    print $form->showrefnav($objsoc, 'id', '', 1, 'rowid', 'nom');
    print '</td></tr>';
    // Remise
    print '<tr><td colspan="2" width="25%">';
    print $langs->trans("CustomerRelativeDiscount") . '</td><td colspan="2">' . price2num($objsoc->remise_percent) . "%</td></tr>";
    print '</table>';
    print '<br>';
    print_fiche_titre($langs->trans("NewRelativeDiscount"), '', '');
    print '<table class="border" width="100%">';
    // Nouvelle valeur
    print '<tr><td colspan="2">';
    print $langs->trans("NewValue") . '</td><td colspan="2"><input type="text" size="5" name="remise" value="' . ($_POST["remise"] ? $_POST["remise"] : '') . '">%</td></tr>';
    // Motif/Note
    print '<tr><td colspan="2" width="25%">';
    print $langs->trans("NoteReason") . '</td><td colspan="2"><input type="text" size="60" name="note" value="' . $_POST["note"] . '"></td></tr>';
    print "</table>";
Example #5
0
 */
$title = !empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses");
llxHeader('', $title, 'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
$form = new Form($db);
$contact = new Contact($db);
$contact->fetch($id, $user);
$head = contact_prepare_head($contact);
dol_fiche_head($head, 'exportimport', $title, 0, 'contact');
/*
 * Fiche en mode visu
 */
print '<table class="border" width="100%">';
$linkback = '<a href="' . DOL_URL_ROOT . '/contact/list.php">' . $langs->trans("BackToList") . '</a>';
// Ref
print '<tr><td>' . $langs->trans("Ref") . '</td><td colspan="3">';
print $form->showrefnav($contact, 'id', $linkback);
print '</td></tr>';
// Name
print '<tr><td width="20%">' . $langs->trans("Lastname") . ' / ' . $langs->trans("Label") . '</td><td>' . $contact->lastname . '</td>';
print '<td width="20%">' . $langs->trans("Firstname") . '</td><td width="25%">' . $contact->firstname . '</td></tr>';
// Company
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) {
    if ($contact->socid > 0) {
        $objsoc = new Societe($db);
        $objsoc->fetch($contact->socid);
        print '<tr><td width="15%">' . $langs->trans("ThirdParty") . '</td><td colspan="3">' . $objsoc->getNomUrl(1) . '</td></tr>';
    } else {
        print '<tr><td width="15%">' . $langs->trans("ThirdParty") . '</td><td colspan="3">';
        print $langs->trans("ContactNotLinkedToCompany");
        print '</td></tr>';
    }
Example #6
0
     print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">';
     print '</div>';
     print '</form>';
 } else {
     dol_fiche_head($head, 'card', $langs->trans("Action"), 0, 'action');
     // Clone event
     if ($action == 'clone') {
         $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1);
         print $formconfirm;
     }
     // Affichage fiche action en mode visu
     print '<table class="border" width="100%">';
     $linkback = '<a href="' . DOL_URL_ROOT . '/comm/action/listactions.php">' . $langs->trans("BackToList") . '</a>';
     // Ref
     print '<tr><td width="30%">' . $langs->trans("Ref") . '</td><td colspan="3">';
     print $form->showrefnav($object, 'id', $linkback, $user->societe_id ? 0 : 1, 'id', 'ref', '');
     print '</td></tr>';
     // Type
     if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
         print '<tr><td>' . $langs->trans("Type") . '</td><td colspan="3">' . $object->type . '</td></tr>';
     }
     // Title
     print '<tr><td>' . $langs->trans("Title") . '</td><td colspan="3">' . dol_htmlentities($object->label) . '</td></tr>';
     // Full day event
     print '<tr><td>' . $langs->trans("EventOnFullDay") . '</td><td colspan="3">' . yn($object->fulldayevent, 3) . '</td></tr>';
     $rowspan = 4;
     if (empty($conf->global->AGENDA_DISABLE_LOCATION)) {
         $rowspan++;
     }
     // Date start
     print '<tr><td width="30%">' . $langs->trans("DateActionStart") . '</td><td colspan="3">';
Example #7
0
         $nbline = $limitsql;
     } else {
         $page = 0;
         $limitsql = $nbline;
     }
 }
 //print $limitsql.'-'.$page.'-'.$viewline;
 // Onglets
 $head = bank_prepare_head($object);
 dol_fiche_head($head, 'journal', $langs->trans("FinancialAccount"), 0, 'account');
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/compta/bank/index.php">' . $langs->trans("BackToList") . '</a>';
 // Ref
 print '<tr><td width="25%">' . $langs->trans("Ref") . '</td>';
 print '<td colspan="3">';
 print $form->showrefnav($object, 'ref', $linkback, 1, 'ref');
 print '</td></tr>';
 // Label
 print '<tr><td>' . $langs->trans("Label") . '</td>';
 print '<td colspan="3">' . $object->label . '</td></tr>';
 print '</table>';
 dol_fiche_end();
 /*
  * Buttons actions
  */
 if ($action != 'delete') {
     print '<div class="tabsAction">';
     if ($action != 'addline') {
         if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
             if (empty($conf->accounting->enabled)) {
                 if ($user->rights->banque->modifier) {
Example #8
0
 $bankline->load_previous_next_ref('', 'rowid');
 // Confirmations
 if ($action == 'delete_categ') {
     print $form->formconfirm($_SERVER['PHP_SELF'] . "?rowid=" . $rowid . "&cat1=" . GETPOST("fk_categ") . "&orig_account=" . $orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
 }
 print '<form name="update" method="POST" action="' . $_SERVER['PHP_SELF'] . '?rowid=' . $rowid . '">';
 print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
 print '<input type="hidden" name="action" value="update">';
 print '<input type="hidden" name="orig_account" value="' . $orig_account . '">';
 print '<input type="hidden" name="id" value="' . $acct->id . '">';
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/compta/bank/search.php">' . $langs->trans("BackToList") . '</a>';
 // Ref
 print '<tr><td width="20%">' . $langs->trans("Ref") . "</td>";
 print '<td colspan="4">';
 print $form->showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid');
 print '</td>';
 print '</tr>';
 $i++;
 // Bank account
 print "<tr><td>" . $langs->trans("Account") . "</td>";
 print '<td colspan="4">';
 print $acct->getNomUrl(1, 'transactions');
 print '</td>';
 print '</tr>';
 // Show links of bank transactions
 if (count($links)) {
     print "<tr><td>" . $langs->trans("Links") . "</td>";
     print '<td colspan="4">';
     foreach ($links as $key => $val) {
         if ($key) {
 llxHeader("", "", $langs->trans("CardProduct" . $product->type));
 if ($result > 0) {
     $head = product_prepare_head($product, $user);
     $titre = $langs->trans("CardProduct" . $product->type);
     $picto = $product->type == 1 ? 'service' : 'product';
     dol_fiche_head($head, 'referers', $titre, 0, $picto);
     $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action);
     // Note that $action and $object may have been modified by hook
     if ($reshook < 0) {
         setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
     }
     print '<table class="border" width="100%">';
     // Reference
     print '<tr>';
     print '<td width="30%">' . $langs->trans("Ref") . '</td><td colspan="3">';
     print $form->showrefnav($product, 'ref', '', 1, 'ref');
     print '</td></tr>';
     // Libelle
     print '<tr><td>' . $langs->trans("Label") . '</td><td colspan="3">' . $product->libelle . '</td></tr>';
     // Status (to sell)
     print '<tr><td>' . $langs->trans("Status") . ' (' . $langs->trans("Sell") . ')</td><td colspan="3">';
     print $product->getLibStatut(2, 0);
     print '</td></tr>';
     // Status (to buy)
     print '<tr><td>' . $langs->trans("Status") . ' (' . $langs->trans("Buy") . ')</td><td colspan="3">';
     print $product->getLibStatut(2, 1);
     print '</td></tr>';
     show_stats_for_company($product, $socid);
     print "</table>";
     print '</div>';
     $sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client,";
Example #10
0
 $tab = GETPOST('tab') ? GETPOST('tab') : 'tasks';
 $head = project_prepare_head($object);
 dol_fiche_head($head, $tab, $langs->trans("Project"), 0, $object->public ? 'projectpub' : 'project');
 $param = $mode == 'mine' ? '&mode=mine' : '';
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/projet/list.php">' . $langs->trans("BackToList") . '</a>';
 // Ref
 print '<tr><td width="30%">';
 print $langs->trans("Ref");
 print '</td><td>';
 // Define a complementary filter for search of next/prev ref.
 if (!$user->rights->projet->all->lire) {
     $projectsListId = $object->getProjectsAuthorizedForUser($user, $mine, 0);
     $object->next_prev_filter = " rowid in (" . (count($projectsListId) ? join(',', array_keys($projectsListId)) : '0') . ")";
 }
 print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '', $param);
 print '</td></tr>';
 print '<tr><td>' . $langs->trans("Label") . '</td><td>' . $object->title . '</td></tr>';
 print '<tr><td>' . $langs->trans("ThirdParty") . '</td><td>';
 if (!empty($object->thirdparty->id)) {
     print $object->thirdparty->getNomUrl(1);
 } else {
     print '&nbsp;';
 }
 print '</td>';
 print '</tr>';
 // Visibility
 print '<tr><td>' . $langs->trans("Visibility") . '</td><td>';
 if ($object->public) {
     print $langs->trans('SharedProject');
 } else {
Example #11
0
            print '<a class="butActionRefused" href="#" title="' . $langs->trans("NotEnoughPermissions") . '">' . $langs->trans('NewCheckDepositOn', $account_label) . '</a>';
        }
        print '</div><br>';
        print '</form>';
    }
} else {
    $object = $remisecheque;
    $linkback = '<a href="' . $_SERVER["PHP_SELF"] . '?leftmenu=customers_bills_checks&action=new">' . $langs->trans("BackToList") . '</a>';
    $paymentstatic = new Paiement($db);
    $accountlinestatic = new AccountLine($db);
    $accountstatic = new Account($db);
    $accountstatic->id = $remisecheque->account_id;
    $accountstatic->label = $remisecheque->account_label;
    print '<table class="border" width="100%">';
    print '<tr><td width="20%">' . $langs->trans('Ref') . '</td><td colspan="2" >';
    print $html->showrefnav($remisecheque, 'ref', $linkback, 1, 'number');
    print "</td>";
    print "</tr>\n";
    print '<tr><td>';
    print '<table class="nobordernopadding" width="100%"><tr><td>';
    print $langs->trans('Date');
    print '</td>';
    if ($action != 'editdate') {
        print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdate&amp;id=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';
    }
    print '</tr></table>';
    print '</td><td colspan="2">';
    if ($action == 'editdate') {
        print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
        print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
        print '<input type="hidden" name="action" value="setdate">';
if ($id > 0) {
    /*
     * Affichage onglets
     */
    if (!empty($conf->notification->enabled)) {
        $langs->load("mails");
    }
    $head = contact_prepare_head($object);
    dol_fiche_head($head, 'note', $title, 0, 'contact');
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<table class="border" width="100%">';
    $linkback = '<a href="' . DOL_URL_ROOT . '/contact/list.php">' . $langs->trans("BackToList") . '</a>';
    // Ref
    print '<tr><td width="20%">' . $langs->trans("Ref") . '</td><td colspan="3">';
    print $form->showrefnav($object, 'id', $linkback);
    print '</td></tr>';
    // Name
    print '<tr><td width="20%">' . $langs->trans("Lastname") . ' / ' . $langs->trans("Label") . '</td><td width="30%">' . $object->lastname . '</td>';
    print '<td width="20%">' . $langs->trans("Firstname") . '</td><td width="30%">' . $object->firstname . '</td></tr>';
    // Company
    if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) {
        if ($object->socid > 0) {
            $objsoc = new Societe($db);
            $objsoc->fetch($object->socid);
            print '<tr><td>' . $langs->trans("Company") . '</td><td colspan="3">' . $objsoc->getNomUrl(1) . '</td></tr>';
        } else {
            print '<tr><td>' . $langs->trans("Company") . '</td><td colspan="3">';
            print $langs->trans("ContactNotLinkedToCompany");
            print '</td></tr>';
        }
Example #13
0
			dol_fiche_head($head, 'card', $langs->trans("Warehouse"), 0, 'stock');

			// Confirm delete third party
			if ($action == 'delete')
			{
				$form = new Form($db);
				$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteAWarehouse"),$langs->trans("ConfirmDeleteWarehouse",$object->libelle),"confirm_delete",'',0,2);
				if ($ret == 'html') print '<br>';
			}

			print '<table class="border" width="100%">';

			// Ref
			print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
			print $form->showrefnav($object,'id','',1,'rowid','libelle');
			print '</td>';

			print '<tr><td>'.$langs->trans("LocationSummary").'</td><td colspan="3">'.$object->lieu.'</td></tr>';

			// Description
			print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="3">'.nl2br($object->description).'</td></tr>';

			// Address
			print '<tr><td>'.$langs->trans('Address').'</td><td colspan="3">';
			print $object->address;
			print '</td></tr>';

			// Ville
			print '<tr><td width="25%">'.$langs->trans('Zip').'</td><td width="25%">'.$object->zip.'</td>';
			print '<td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$object->town.'</td></tr>';
Example #14
0
         //print $lines[$i]->volume."x".$lines[$i]->volume_units."x".($lines[$i]->volume_units < 50)."x".$volumeUnit;
         $trueVolumeUnit = pow(10, $volumeUnit);
         //print $lines[$i]->volume;
         $totalVolume += $lines[$i]->volume * $lines[$i]->qty_shipped * $trueVolumeUnit;
     } else {
         $trueVolumeUnit = $volumeUnit;
         $totalVolume += $lines[$i]->volume * $lines[$i]->qty_shipped;
     }
 }
 $totalVolume = $totalVolume;
 //print "totalVolume=".$totalVolume." volumeUnit=".$volumeUnit;
 print '<table class="border" width="100%">';
 // Ref
 print '<tr><td width="20%">' . $langs->trans("Ref") . '</td>';
 print '<td colspan="3">';
 print $html->showrefnav($object, 'ref', '', 1, 'ref', 'ref');
 print '</td></tr>';
 // Customer
 print '<tr><td width="20%">' . $langs->trans("Customer") . '</td>';
 print '<td colspan="3">' . $soc->getNomUrl(1) . '</td>';
 print "</tr>";
 // Linked documents
 if ($typeobject == 'commande' && $object->{$typeobject}->id && $conf->commande->enabled) {
     print '<tr><td>';
     $objectsrc = new Commande($db);
     $objectsrc->fetch($object->{$typeobject}->id);
     print $langs->trans("RefOrder") . '</td>';
     print '<td colspan="3">';
     print $objectsrc->getNomUrl(1, 'commande');
     print "</td>\n";
     print '</tr>';
Example #15
0
	$soc->id = $_GET["socid"];
	$result=$soc->fetch($_GET["socid"]);

	$head=societe_prepare_head2($soc);

	dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"),0,'company');

	/*
	 * Fiche societe en mode visu
	 */

	print '<table class="border" width="100%">';

    print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>';
    print '<td colspan="3">';
    print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
    print '</td></tr>';

	print '<tr>';
    print '<td>'.$langs->trans('CustomerCode').'</td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
    print $soc->code_client;
    if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
    print '</td>';
    if (! empty($conf->global->SOCIETE_USEPREFIX))  // Old not used prefix field
    {
       print '<td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td>';
    }
    print '</td>';
    print '</tr>';

	print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->address)."</td></tr>";
Example #16
0
    }
}
// Onglets
$head = bank_prepare_head($acct);
dol_fiche_head($head, 'graph', $langs->trans("FinancialAccount"), 0, 'account');
print '<table class="border" width="100%">';
$linkback = '<a href="' . DOL_URL_ROOT . '/compta/bank/index.php">' . $langs->trans("BackToList") . '</a>';
// Ref
print '<tr><td width="25%">' . $langs->trans("Ref") . '</td>';
print '<td colspan="3">';
if ($account) {
    if (!preg_match('/,/', $account)) {
        $moreparam = '&month=' . $month . '&year=' . $year . ($mode == 'showalltime' ? '&mode=showalltime' : '');
        if ($_GET["option"] != 'all') {
            $morehtml = '<a href="' . $_SERVER["PHP_SELF"] . '?account=' . $account . '&option=all' . $moreparam . '">' . $langs->trans("ShowAllAccounts") . '</a>';
            print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam);
        } else {
            $morehtml = '<a href="' . $_SERVER["PHP_SELF"] . '?account=' . $account . $moreparam . '">' . $langs->trans("BackToAccount") . '</a>';
            print $langs->trans("All");
            //print $morehtml;
        }
    } else {
        $bankaccount = new Account($db);
        $listid = explode(',', $account);
        foreach ($listid as $key => $id) {
            $bankaccount->fetch($id);
            $bankaccount->label = $bankaccount->ref;
            print $bankaccount->getNomUrl(1);
            if ($key < count($listid) - 1) {
                print ', ';
            }
 $head[$h][0] = $_SERVER['PHP_SELF'] . "?id=" . $don->id;
 $head[$h][1] = $langs->trans("Card");
 $hselected = $h;
 $h++;
 dol_fiche_head($head, $hselected, $langs->trans("Donation"), 0, 'generic');
 print "<form action=\"fiche.php\" method=\"post\">";
 print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/compta/dons/liste.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
 $nbrows = 12;
 if (!empty($conf->projet->enabled)) {
     $nbrows++;
 }
 // Ref
 print "<tr>" . '<td>' . $langs->trans("Ref") . '</td><td colspan="2">';
 print $form->showrefnav($don, 'rowid', $linkback, 1, 'rowid', 'ref', '');
 print '</td>';
 print '</tr>';
 // Date
 print '<tr><td width="25%">' . $langs->trans("Date") . '</td><td>';
 print dol_print_date($don->date, "day");
 print "</td>";
 print '<td rowspan="' . $nbrows . '" valign="top" width="50%">' . $langs->trans("Comments") . ' :<br>';
 print nl2br($don->note_private) . '</td></tr>';
 print "<tr>" . '<td>' . $langs->trans("Amount") . '</td><td>' . price($don->amount, 0, $langs, 0, 0, -1, $conf->currency) . '</td></tr>';
 print "<tr><td>" . $langs->trans("PublicDonation") . "</td><td>";
 print yn($don->public);
 print "</td></tr>\n";
 print "<tr>" . '<td>' . $langs->trans("Company") . '</td><td>' . $don->societe . '</td></tr>';
 print "<tr>" . '<td>' . $langs->trans("Firstname") . '</td><td>' . $don->firstname . '</td></tr>';
 print "<tr>" . '<td>' . $langs->trans("Lastname") . '</td><td>' . $don->lastname . '</td></tr>';
Example #18
0
/*
 *	View
 */
llxHeader('', $langs->trans("ContactsAddresses"), 'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
$form = new Form($db);
$contact = new Contact($db);
$contact->fetch($_GET["id"], $user);
$head = contact_prepare_head($contact);
dol_fiche_head($head, 'exportimport', $langs->trans("ContactsAddresses"), 0, 'contact');
/*
 * Fiche en mode visu
 */
print '<table class="border" width="100%">';
// Ref
print '<tr><td>' . $langs->trans("Ref") . '</td><td colspan="3">';
print $form->showrefnav($contact, 'id');
print '</td></tr>';
// Name
print '<tr><td width="20%">' . $langs->trans("Lastname") . ' / ' . $langs->trans("Label") . '</td><td>' . $contact->name . '</td>';
print '<td width="20%">' . $langs->trans("Firstname") . '</td><td width="25%">' . $contact->firstname . '</td></tr>';
// Company
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) {
    if ($contact->socid > 0) {
        $objsoc = new Societe($db);
        $objsoc->fetch($contact->socid);
        print '<tr><td width="15%">' . $langs->trans("Company") . '</td><td colspan="3">' . $objsoc->getNomUrl(1) . '</td></tr>';
    } else {
        print '<tr><td width="15%">' . $langs->trans("Company") . '</td><td colspan="3">';
        print $langs->trans("ContactNotLinkedToCompany");
        print '</td></tr>';
    }
Example #19
0
 // Invoice content
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/compta/facture/list.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
 // Ref
 print '<tr><td width="20%">' . $langs->trans('Ref') . '</td>';
 print '<td colspan="5">';
 $morehtmlref = '';
 $discount = new DiscountAbsolute($db);
 $result = $discount->fetch(0, $object->id);
 if ($result > 0) {
     $morehtmlref = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')';
 }
 if ($result < 0) {
     dol_print_error('', $discount->error);
 }
 print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
 print '</td></tr>';
 // Ref customer
 print '<tr><td width="20%">';
 print '<table class="nobordernopadding" width="100%"><tr><td>';
 print $langs->trans('RefCustomer');
 print '</td>';
 if ($action != 'refclient' && !empty($object->brouillon)) {
     print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=refclient&amp;id=' . $object->id . '">' . img_edit($langs->trans('Modify')) . '</a></td>';
 }
 print '</tr></table>';
 print '</td>';
 print '<td colspan="5">';
 if ($user->rights->facture->creer && $action == 'refclient') {
     print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
Example #20
0
	llxHeader("","",$langs->trans("CardProduct".$product->type));

	if ($result > 0)
	{

		$head=product_prepare_head($product,$user);
		$titre=$langs->trans("CardProduct".$product->type);
		$picto=($product->type==1?'service':'product');
		dol_fiche_head($head, 'referers', $titre, 0, $picto);

		print '<table class="border" width="100%">';

		// Reference
		print '<tr>';
		print '<td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">';
		print $html->showrefnav($product,'ref','',1,'ref');
		print '</td>';
		print '</tr>';

		// Libelle
		print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td>';
		print '</tr>';

		// Status (to sell)
		print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td colspan="3">';
		print $product->getLibStatut(2,0);
		print '</td></tr>';

		// Status (to buy)
		print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td colspan="3">';
		print $product->getLibStatut(2,1);
Example #21
0
	$head = user_prepare_head($fuser);

	$title = $langs->trans("User");
	dol_fiche_head($head, 'note', $title, 0, 'user');

	if ($msg) print '<div class="error">'.$msg.'</div>';

	print "<form method=\"post\" action=\"note.php\">";
	print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';

    print '<table class="border" width="100%">';

    // Reference
	print '<tr><td width="20%">'.$langs->trans('Ref').'</td>';
	print '<td colspan="3">';
	print $html->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user->admin);
	print '</td>';
	print '</tr>';

    // Nom
    print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$fuser->nom.'&nbsp;</td>';
	print '</tr>';

    // Prenom
    print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$fuser->prenom.'&nbsp;</td></tr>';

    // Login
    print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$fuser->login.'&nbsp;</td></tr>';

	// Note
    print '<tr><td valign="top">'.$langs->trans("Note").'</td>';
Example #22
0
 // Tabs for project
 $tab = 'tasks';
 $head = project_prepare_head($projectstatic);
 dol_fiche_head($head, $tab, $langs->trans("Project"), 0, $projectstatic->public ? 'projectpub' : 'project');
 $param = $mode == 'mine' ? '&mode=mine' : '';
 print '<table class="border" width="100%">';
 // Ref
 print '<tr><td width="30%">';
 print $langs->trans("Ref");
 print '</td><td>';
 // Define a complementary filter for search of next/prev ref.
 if (!$user->rights->projet->all->lire) {
     $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, $mine, 0);
     $projectstatic->next_prev_filter = " rowid in (" . (count($projectsListId) ? join(',', array_keys($projectsListId)) : '0') . ")";
 }
 print $form->showrefnav($projectstatic, 'project_ref', '', 1, 'ref', 'ref', '', $param . '&withproject=1');
 print '</td></tr>';
 print '<tr><td>' . $langs->trans("Label") . '</td><td>' . $projectstatic->title . '</td></tr>';
 print '<tr><td>' . $langs->trans("ThirdParty") . '</td><td>';
 if (!empty($projectstatic->thirdparty->id)) {
     print $projectstatic->thirdparty->getNomUrl(1);
 } else {
     print '&nbsp;';
 }
 print '</td>';
 print '</tr>';
 // Visibility
 print '<tr><td>' . $langs->trans("Visibility") . '</td><td>';
 if ($projectstatic->public) {
     print $langs->trans('SharedProject');
 } else {
Example #23
0
         $obj = $db->fetch_object($result);
         array_push($permsgroup, $obj->id);
         $i++;
     }
     $db->free($result);
 } else {
     dol_print_error($db);
 }
 /*
  * Ecran ajout/suppression permission
  */
 print '<table class="border" width="100%">';
 // Ref
 print '<tr><td width="25%" valign="top">' . $langs->trans("Ref") . '</td>';
 print '<td colspan="2">';
 print $form->showrefnav($fgroup, 'id', '', $user->rights->user->user->lire || $user->admin);
 print '</td>';
 print '</tr>';
 // Nom
 print '<tr><td width="25%" valign="top">' . $langs->trans("Name") . '</td>';
 print '<td colspan="2">' . $fgroup->name . '';
 if (!$fgroup->entity) {
     print img_picto($langs->trans("GlobalGroup"), 'redstar');
 }
 print "</td></tr>\n";
 // Note
 print '<tr><td width="25%" valign="top">' . $langs->trans("Note") . '</td>';
 print '<td class="valeur">' . dol_htmlentitiesbr($fgroup->note) . '</td>';
 print "</tr>\n";
 print '</table><br>';
 if ($user->admin) {
Example #24
0
    print '</tr>';
    print "</table><br>";
    print '<center>';
    print '<input type="submit" class="button" name="save" value="' . $langs->trans("Save") . '">';
    print ' &nbsp; ';
    print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">';
    print '</center>';
    print "</form>";
} else {
    /*
     * Fiche en mode visu
     */
    print '<table class="border" width="100%">';
    // Ref
    print '<tr><td width="20%">' . $langs->trans("Ref") . '</td><td colspan="3">';
    print $form->showrefnav($object, 'id');
    print '</td></tr>';
    // Name
    print '<tr><td width="20%">' . $langs->trans("Lastname") . ' / ' . $langs->trans("Label") . '</td><td width="30%">' . $object->lastname . '</td>';
    print '<td width="20%">' . $langs->trans("Firstname") . '</td><td width="30%">' . $object->firstname . '</td></tr>';
    // Company
    if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) {
        if ($object->socid > 0) {
            $objsoc = new Societe($db);
            $objsoc->fetch($object->socid);
            print '<tr><td>' . $langs->trans("Company") . '</td><td colspan="3">' . $objsoc->getNomUrl(1) . '</td></tr>';
        } else {
            print '<tr><td>' . $langs->trans("Company") . '</td><td colspan="3">';
            print $langs->trans("ContactNotLinkedToCompany");
            print '</td></tr>';
        }
 $texte = $langs->trans("ListOfStockMovements");
 if ($id) {
     $texte .= ' (' . $langs->trans("ForThisWarehouse") . ')';
 }
 llxHeader("", $texte, $help_url);
 /*
  * Show tab only if we ask a particular warehouse
  */
 if ($id) {
     $head = stock_prepare_head($entrepot);
     dol_fiche_head($head, 'movements', $langs->trans("Warehouse"), 0, 'stock');
     print '<table class="border" width="100%">';
     $linkback = '<a href="' . DOL_URL_ROOT . '/adherents/liste.php">' . $langs->trans("BackToList") . '</a>';
     // Ref
     print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td colspan="3">';
     print $form->showrefnav($entrepot, 'id', $linkback, 1, 'rowid', 'libelle');
     print '</td>';
     print '<tr><td>' . $langs->trans("LocationSummary") . '</td><td colspan="3">' . $entrepot->lieu . '</td></tr>';
     // Description
     print '<tr><td valign="top">' . $langs->trans("Description") . '</td><td colspan="3">' . dol_htmlentitiesbr($entrepot->description) . '</td></tr>';
     // Address
     print '<tr><td>' . $langs->trans('Address') . '</td><td colspan="3">';
     print $entrepot->address;
     print '</td></tr>';
     // Town
     print '<tr><td width="25%">' . $langs->trans('Zip') . '</td><td width="25%">' . $entrepot->zip . '</td>';
     print '<td width="25%">' . $langs->trans('Town') . '</td><td width="25%">' . $entrepot->town . '</td></tr>';
     // Country
     print '<tr><td>' . $langs->trans('Country') . '</td><td colspan="3">';
     if (!empty($entrepot->country_code)) {
         $img = picto_from_langcode($entrepot->country_code);
Example #26
0
	$societe->fetch($object->socid);

	$head = propal_prepare_head($object);
	dol_fiche_head($head, 'compta', $langs->trans('Proposal'), 0, 'propal');


	/*
	 * Proposal card
	 */
	print '<table class="border" width="100%">';

	$linkback="<a href=\"".$_SERVER["PHP_SELF"]."?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder\">".$langs->trans("BackToList")."</a>";

	// Ref
	print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="5">';
	print $html->showrefnav($object,'ref',$linkback,1,'ref','ref','');
	print '</td></tr>';

	// Ref client
	print '<tr><td>';
	print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
	print $langs->trans('RefCustomer').'</td><td align="left">';
	print '</td>';
	if ($_GET['action'] != 'refclient' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=refclient&amp;id='.$object->id.'">'.img_edit($langs->trans('Modify')).'</a></td>';
	print '</tr></table>';
	print '</td><td colspan="5">';
	print $object->ref_client;
	print '</td>';
	print '</tr>';

	$rowspan=8;
 }
 /*
  * Affichage fiche
  */
 if ($action != 'edit' && $action != 're-edit') {
     $head = stock_prepare_head($object);
     dol_fiche_head($head, 'card', $langs->trans("Warehouse"), 0, 'stock');
     // Confirm delete third party
     if ($action == 'delete') {
         print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $object->id, $langs->trans("DeleteAWarehouse"), $langs->trans("ConfirmDeleteWarehouse", $object->libelle), "confirm_delete", '', 0, 2);
     }
     print '<table class="border" width="100%">';
     $linkback = '<a href="' . DOL_URL_ROOT . '/product/stock/liste.php">' . $langs->trans("BackToList") . '</a>';
     // Ref
     print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td colspan="3">';
     print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'libelle');
     print '</td>';
     print '<tr><td>' . $langs->trans("LocationSummary") . '</td><td colspan="3">' . $object->lieu . '</td></tr>';
     // Description
     print '<tr><td valign="top">' . $langs->trans("Description") . '</td><td colspan="3">' . nl2br($object->description) . '</td></tr>';
     // Address
     print '<tr><td>' . $langs->trans('Address') . '</td><td colspan="3">';
     print $object->address;
     print '</td></tr>';
     // Town
     print '<tr><td width="25%">' . $langs->trans('Zip') . '</td><td width="25%">' . $object->zip . '</td>';
     print '<td width="25%">' . $langs->trans('Town') . '</td><td width="25%">' . $object->town . '</td></tr>';
     // Country
     print '<tr><td>' . $langs->trans('Country') . '</td><td colspan="3">';
     if (!empty($object->country_code)) {
         $img = picto_from_langcode($object->country_code);
Example #28
0
				 */
				if ($_GET["action"] == 'delete')
				{
					$ret=$html->form_confirm("fiche.php?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete");
					if ($ret == 'html') print '<br>';
				}

				$soc = new Societe($db);
				if ($deplacement->socid) $soc->fetch($deplacement->socid);

				print '<table class="border" width="100%">';

				// Ref
				print "<tr>";
				print '<td width="20%">'.$langs->trans("Ref").'</td><td>';
                print $html->showrefnav($deplacement,'id','',1,'rowid','ref','');
				print '</td></tr>';

				// Type
				print '<tr><td>'.$langs->trans("Type").'</td><td>'.$langs->trans($deplacement->type).'</td></tr>';

				// Who
				print '<tr><td>'.$langs->trans("Person").'</td><td>';
				$userfee=new User($db);
				$userfee->fetch($deplacement->fk_user);
				print $userfee->getNomUrl(1);
				print '</td></tr>';

				// Date
				print '<tr><td>'.$langs->trans("Date").'</td><td>';
				print dol_print_date($deplacement->date,'day');
Example #29
0
 $upload_dir = $conf->bank->dir_output . '/' . $object->ref;
 // Onglets
 $head = bank_prepare_head($object);
 dol_fiche_head($head, 'document', $langs->trans("FinancialAccount"), 0, 'account');
 // Construit liste des fichiers
 $filearray = dol_dir_list($upload_dir, "files", 0, '', '\\.meta$', $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1);
 $totalsize = 0;
 foreach ($filearray as $key => $file) {
     $totalsize += $file['size'];
 }
 print '<table class="border"width="100%">';
 // Ref
 // Ref
 print '<tr><td valign="top" width="25%">' . $langs->trans("Ref") . '</td>';
 print '<td colspan="3">';
 print $form->showrefnav($object, 'ref', '', 1, 'ref');
 print '</td></tr>';
 // Label
 print '<tr><td valign="top">' . $langs->trans("Label") . '</td>';
 print '<td colspan="3">' . $object->label . '</td></tr>';
 // Status
 print '<tr><td valign="top">' . $langs->trans("Status") . '</td>';
 print '<td colspan="3">' . $object->getLibStatut(4) . '</td></tr>';
 print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>';
 print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>';
 print "</table>\n";
 print "</div>\n";
 dol_htmloutput_mesg($mesg, $mesgs);
 /*
  * Confirmation suppression fichier
  */
Example #30
0
}
/******************************************************************************/
/* Affichage fiche                                                            */
/******************************************************************************/
llxHeader();
$form = new Form($db);
if ($id > 0 || !empty($ref)) {
    dol_htmloutput_mesg($mesg);
    $object->fetch_thirdparty();
    $head = contract_prepare_head($object);
    $hselected = 2;
    dol_fiche_head($head, 'note', $langs->trans("Contract"), 0, 'contract');
    print '<table class="border" width="100%">';
    $linkback = '<a href="' . DOL_URL_ROOT . '/contrat/liste.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
    // Reference
    print '<tr><td width="25%">' . $langs->trans('Ref') . '</td><td colspan="5">' . $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '') . '</td></tr>';
    // Societe
    print '<tr><td>' . $langs->trans("Customer") . '</td>';
    print '<td colspan="3">' . $object->thirdparty->getNomUrl(1) . '</td></tr>';
    // Ligne info remises tiers
    print '<tr><td>' . $langs->trans('Discount') . '</td><td>';
    if ($object->thirdparty->remise_client) {
        print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_client);
    } else {
        print $langs->trans("CompanyHasNoRelativeDiscount");
    }
    $absolute_discount = $object->thirdparty->getAvailableDiscounts();
    print '. ';
    if ($absolute_discount) {
        print $langs->trans("CompanyHasAbsoluteDiscount", $absolute_discount, $langs->trans("Currency" . $conf->currency));
    } else {