$text .= '<br><br>';
         }
         $text .= $langs->trans('ConfirmSendingEmailing') . '<br>';
         $text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB);
         print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('SendMailing'), $text, 'sendallconfirmed', $formquestion, '', 1, 260);
     }
 }
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/comm/mailing/liste.php">' . $langs->trans("BackToList") . '</a>';
 print '<tr><td width="25%">' . $langs->trans("Ref") . '</td>';
 print '<td colspan="3">';
 print $form->showrefnav($object, 'id', $linkback);
 print '</td></tr>';
 // Description
 print '<tr><td>' . $form->editfieldkey("MailTitle", 'titre', $object->titre, $object, $user->rights->mailing->creer && $object->statut < 3, 'string') . '</td><td colspan="3">';
 print $form->editfieldval("MailTitle", 'titre', $object->titre, $object, $user->rights->mailing->creer && $object->statut < 3, 'string');
 print '</td></tr>';
 // From
 print '<tr><td>' . $form->editfieldkey("MailFrom", 'email_from', $object->email_from, $object, $user->rights->mailing->creer && $object->statut < 3, 'string') . '</td><td colspan="3">';
 print $form->editfieldval("MailFrom", 'email_from', $object->email_from, $object, $user->rights->mailing->creer && $object->statut < 3, 'string');
 print '</td></tr>';
 // Errors to
 print '<tr><td>' . $form->editfieldkey("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->rights->mailing->creer && $object->statut < 3, 'string') . '</td><td colspan="3">';
 print $form->editfieldval("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->rights->mailing->creer && $object->statut < 3, 'string');
 print '</td></tr>';
 // Status
 print '<tr><td>' . $langs->trans("Status") . '</td><td colspan="3">' . $object->getLibStatut(4) . '</td></tr>';
 // Nb of distinct emails
 print '<tr><td>';
 print $langs->trans("TotalNbOfDistinctRecipients");
 print '</td><td colspan="3">';
Example #2
0
 }
 $head = product_prepare_head($object);
 $titre = $langs->trans("CardProduct" . $object->type);
 $picto = $object->type == Product::TYPE_SERVICE ? 'service' : 'product';
 dol_fiche_head($head, 'card', $titre, 0, $picto);
 dol_banner_tab($object, 'ref', '', $user->societe_id ? 0 : 1, 'ref');
 print '<div class="fichecenter">';
 print '<div class="fichehalfleft">';
 print '<div class="underbanner clearboth"></div>';
 print '<table class="border tableforfield" width="100%">';
 // Type
 if (!empty($conf->produit->enabled) && !empty($conf->service->enabled)) {
     // TODO change for compatibility with edit in place
     $typeformat = 'select;0:' . $langs->trans("Product") . ',1:' . $langs->trans("Service");
     print '<tr><td class="titlefield">' . $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $user->rights->produit->creer || $user->rights->service->creer, $typeformat) . '</td><td colspan="2">';
     print $form->editfieldval("Type", 'fk_product_type', $object->type, $object, $user->rights->produit->creer || $user->rights->service->creer, $typeformat);
     print '</td></tr>';
 }
 if ($showbarcode) {
     // Barcode type
     print '<tr><td class="nowrap">';
     print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
     print $langs->trans("BarcodeType");
     print '<td>';
     if ($action != 'editbarcodetype' && !empty($user->rights->barcode->creer)) {
         print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editbarcodetype&amp;id=' . $object->id . '">' . img_edit($langs->trans('Edit'), 1) . '</a></td>';
     }
     print '</tr></table>';
     print '</td><td colspan="2">';
     if ($action == 'editbarcodetype') {
         require_once DOL_DOCUMENT_ROOT . '/core/class/html.formbarcode.class.php';
Example #3
0
     print '</td></tr>';
 }
 if ($objsoc->client) {
     $langs->load("compta");
     print '<tr><td nowrap>';
     print $langs->trans('CustomerCode') . '</td><td colspan="3">';
     print $objsoc->code_client;
     if ($objsoc->check_codeclient() != 0) {
         print ' <font class="error">(' . $langs->trans("WrongCustomerCode") . ')</font>';
     }
     print '</td></tr>';
     print '<tr>';
     print '<td>';
     print $form->editfieldkey("CustomerAccountancyCode", 'customeraccountancycode', $objsoc->code_compta, 'socid', $objsoc->id, $user->rights->societe->creer);
     print '</td><td colspan="3">';
     print $form->editfieldval("CustomerAccountancyCode", 'customeraccountancycode', $objsoc->code_compta, 'socid', $objsoc->id, $user->rights->societe->creer);
     print '</td>';
     print '</tr>';
 }
 // Address
 print '<tr><td valign="top">' . $langs->trans('Address') . '</td><td colspan="3">';
 dol_print_address($objsoc->address, 'gmap', 'thirdparty', $objsoc->id);
 print "</td></tr>";
 // Zip / Town
 print '<tr><td nowrap="nowrap">' . $langs->trans('Zip') . ' / ' . $langs->trans('Town') . '</td><td colspan="3">' . $objsoc->cp . ($objsoc->cp && $objsoc->ville ? ' / ' : '') . $objsoc->ville . "</td>";
 print '</tr>';
 // Country
 print '<tr><td>' . $langs->trans("Country") . '</td><td colspan="3">';
 $img = picto_from_langcode($objsoc->pays_code);
 if ($objsoc->isInEEC()) {
     print $form->textwithpicto(($img ? $img . ' ' : '') . $objsoc->pays, $langs->trans("CountryIsInEEC"), 1, 0);
Example #4
0

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

            // Ref
            print '<tr><td nowrap="nowrap" width="20%">'.$langs->trans("Ref").'</td><td colspan="4">';
            print $html->showrefnav($fac,'facid','',1,'rowid','ref',$morehtmlref);
            print '</td>';
            print "</tr>\n";

            // Ref supplier
            print '<tr><td>'.$html->editfieldkey("RefSupplier",'ref_supplier',$fac->ref_supplier,'facid',$fac->id,($fac->statut<2 && $user->rights->fournisseur->facture->creer)).'</td><td colspan="4">';
            print $html->editfieldval("RefSupplier",'ref_supplier',$fac->ref_supplier,'facid',$fac->id,($fac->statut<2 && $user->rights->fournisseur->facture->creer));
            print '</td></tr>';

            // Third party
            print '<tr><td>'.$langs->trans('Supplier').'</td><td colspan="4">'.$societe->getNomUrl(1);
            print ' &nbsp; (<a href="'.DOL_URL_ROOT.'/fourn/facture/index.php?socid='.$fac->socid.'">'.$langs->trans('OtherBills').'</a>)</td>';
            print '</tr>';

            // Type
            print '<tr><td>'.$langs->trans('Type').'</td><td colspan="4">';
            print $fac->getLibType();
            if ($fac->type == 1)
            {
                $facreplaced=new FactureFournisseur($db);
                $facreplaced->fetch($fac->fk_facture_source);
                print ' ('.$langs->transnoentities("ReplaceInvoice",$facreplaced->getNomUrl(1)).')';
Example #5
0
     if ($product_fourn->product_fourn_price_id > 0) {
         print $product_fourn->display_price_product_fournisseur();
     } else {
         print $langs->trans("NotDefined");
     }
 }
 print '</td></tr>';
 // Cost price. Can be used for margin module for option "calculate margin on explicit cost price
 // Accountancy sell code
 print '<tr><td>';
 $textdesc = $langs->trans("CostPriceDescription");
 $textdesc .= "<br>" . $langs->trans("CostPriceUsage");
 $text = $form->textwithpicto($langs->trans("CostPrice"), $textdesc, 1, 'help', '');
 print $form->editfieldkey($text, 'cost_price', $object->cost_price, $object, $user->rights->produit->creer || $user->rights->service->creer, 'amount:6');
 print '</td><td colspan="2">';
 print $form->editfieldval($text, 'cost_price', $object->cost_price, $object, $user->rights->produit->creer || $user->rights->service->creer, 'amount:6');
 print '</td></tr>';
 print '</table>';
 print '</div>';
 print '<div style="clear:both"></div>';
 dol_fiche_end();
 // Form to add or update a price
 if (($action == 'add_price' || $action == 'updateprice') && ($user->rights->produit->creer || $user->rights->service->creer)) {
     $langs->load("suppliers");
     if ($rowid) {
         $object->fetch_product_fournisseur_price($rowid, 1);
         //Ignore the math expression when getting the price
         print load_fiche_titre($langs->trans("ChangeSupplierPrice"));
     } else {
         print load_fiche_titre($langs->trans("AddSupplierPrice"));
     }
Example #6
0
     print $object->trueWeight;
     print $object->trueWeight && $object->weight_units != '' ? ' ' . measuring_units_string($object->weight_units, "weight") : '';
 }
 if ($totalWeight > 0) {
     if (!empty($object->trueWeight)) {
         print ' (' . $langs->trans("SumOfProductWeights") . ': ';
     }
     print $totalWeight . ' ' . measuring_units_string(0, "weight");
     if (!empty($object->trueWeight)) {
         print ')';
     }
 }
 print '</td></tr>';
 // Width
 print '<tr><td>' . $form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->rights->expedition->creer) . '</td><td colspan="3">';
 print $form->editfieldval("Width", 'trueWidth', $object->trueWidth, $object, $user->rights->expedition->creer);
 print $object->trueWidth && $object->width_units != '' ? ' ' . measuring_units_string($object->width_units, "size") : '';
 print '</td></tr>';
 // Height
 print '<tr><td>' . $form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->rights->expedition->creer) . '</td><td colspan="3">';
 if ($action == 'edittrueHeight') {
     print '<form name="settrueHeight" action="' . $_SERVER["PHP_SELF"] . '" method="post">';
     print '<input name="action" value="settrueHeight" type="hidden">';
     print '<input name="id" value="' . $object->id . '" type="hidden">';
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     print '<input id="trueHeight" name="trueHeight" value="' . $object->trueHeight . '" type="text">';
     print $formproduct->select_measuring_units("size_units", "size", $object->size_units);
     print ' <input class="button" name="modify" value="' . $langs->trans("Modify") . '" type="submit">';
     print ' <input class="button" name="cancel" value="' . $langs->trans("Cancel") . '" type="submit">';
     print '</form>';
 } else {
Example #7
0
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     print '<input type="hidden" name="action" value="setremise">';
 }
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/contrat/list.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
 // Ref du contrat
 if (!empty($modCodeContract->code_auto)) {
     print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td colspan="3">';
     print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
     print "</td></tr>";
 } else {
     print '<tr>';
     print '<td  width="20%">';
     print $form->editfieldkey("Ref", 'ref', $object->ref, $object, $user->rights->contrat->creer);
     print '</td><td>';
     print $form->editfieldval("Ref", 'ref', $object->ref, $object, $user->rights->contrat->creer);
     print '</td>';
     print '</tr>';
 }
 print '<tr>';
 print '<td  width="20%">';
 print $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->rights->contrat->creer);
 print '</td><td>';
 print $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->rights->contrat->creer);
 print '</td>';
 print '</tr>';
 print '<tr>';
 print '<td  width="20%">';
 print $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->contrat->creer);
 print '</td><td>';
 print $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->contrat->creer);
Example #8
0
         print price($object->price_min) . ' ' . $langs->trans($object->price_base_type);
     }
     print '</td></tr>';
 } else {
     // Price
     print '<tr><td>' . $langs->trans("SellingPrice") . '</td><td>';
     print $langs->trans("Variable");
     print '</td></tr>';
     // Price minimum
     print '<tr><td>' . $langs->trans("MinPrice") . '</td><td>';
     print $langs->trans("Variable");
     print '</td></tr>';
 }
 // Stock alert threshold
 print '<tr><td>' . $form->editfieldkey("StockLimit", 'stocklimit', $product->seuil_stock_alerte, $product, $user->rights->produit->creer) . '</td><td colspan="2">';
 print $form->editfieldval("StockLimit", 'stocklimit', $product->seuil_stock_alerte, $product, $user->rights->produit->creer);
 print '</td></tr>';
 // Desired stock
 print '<tr><td>' . $form->editfieldkey("DesiredStock", 'desiredstock', $product->desiredstock, $product, $user->rights->produit->creer) . '</td><td colspan="2">';
 print $form->editfieldval("DesiredStock", 'desiredstock', $product->desiredstock, $product, $user->rights->produit->creer);
 print '</td></tr>';
 // Real stock
 $product->load_stock();
 $text_stock_options = '';
 $text_stock_options .= !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) ? $langs->trans("DeStockOnShipment") . '<br>' : '';
 $text_stock_options .= !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) ? $langs->trans("DeStockOnValidateOrder") . '<br>' : '';
 $text_stock_options .= !empty($conf->global->STOCK_CALCULATE_ON_BILL) ? $langs->trans("DeStockOnBill") . '<br>' : '';
 $text_stock_options .= !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) ? $langs->trans("ReStockOnBill") . '<br>' : '';
 $text_stock_options .= !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) ? $langs->trans("ReStockOnValidateOrder") . '<br>' : '';
 $text_stock_options .= !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) ? $langs->trans("ReStockOnDispatchOrder") . '<br>' : '';
 print '<tr><td>';
Example #9
0
					$text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
					$ret=$html->form_confirm($_SERVER['PHP_SELF'].'?id='.$_REQUEST['id'],$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,260);
					if ($ret == 'html') print '<br>';
				}
			}

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

			print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
			print '<td colspan="3">';
			print $html->showrefnav($mil,'id');
			print '</td></tr>';

			// Description
			print '<tr><td>'.$html->editfieldkey("MailTitle",'desc',$mil->titre,'id',$mil->id,$user->rights->mailing->creer).'</td><td colspan="3">';
			print $html->editfieldval("MailTitle",'desc',$mil->titre,'id',$mil->id,$user->rights->mailing->creer);
			print '</td></tr>';

			// From
			print '<tr><td>'.$html->editfieldkey("MailFrom",'from',$mil->email_from,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email').'</td><td colspan="3">';
			print $html->editfieldval("MailFrom",'from',$mil->email_from,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email');
			print '</td></tr>';

			// Errors to
			print '<tr><td>'.$html->editfieldkey("MailErrorsTo",'errorsto',$mil->email_errorsto,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email').'</td><td colspan="3">';
			print $html->editfieldval("MailErrorsTo",'errorsto',$mil->email_errorsto,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email');
			print '</td></tr>';

			// Status
			print '<tr><td width="25%">'.$langs->trans("Status").'</td><td colspan="3">'.$mil->getLibStatut(4).'</td></tr>';
     print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete");
 }
 dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron');
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/admin/fiscalyear.php">' . $langs->trans("BackToList") . '</a>';
 // Ref
 print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td width="50%">';
 print $object->rowid;
 print '</td><td width="25%">';
 print $linkback;
 print '</td></tr>';
 // Label
 print '<tr><td valign="top">';
 print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
 print '</td><td colspan="2">';
 print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
 print "</td></tr>";
 // Date start
 print '<tr><td>';
 print $form->editfieldkey("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
 print '</td><td colspan="2">';
 print $form->editfieldval("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
 print '</td></tr>';
 // Date end
 print '<tr><td>';
 print $form->editfieldkey("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
 print '</td><td colspan="2">';
 print $form->editfieldval("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
 print '</td></tr>';
 // Statut
 print '<tr><td>' . $langs->trans("Status") . '</td><td colspan="2">' . $object->getLibStatut(4) . '</td></tr>';
Example #11
0
            dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref');
            
            
            print '<div class="fichecenter">';
            print '<div class="fichehalfleft">';
            
            print '<div class="underbanner clearboth"></div>';
            print '<table class="border tableforfield" width="100%">';
            
            // Type
            if (! empty($conf->produit->enabled) && ! empty($conf->service->enabled))
            {
            	// TODO change for compatibility with edit in place
            	$typeformat='select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
                print '<tr><td class="titlefield">'.$form->editfieldkey("Type",'fk_product_type',$object->type,$object,$user->rights->produit->creer||$user->rights->service->creer,$typeformat).'</td><td colspan="2">';
                print $form->editfieldval("Type",'fk_product_type',$object->type,$object,$user->rights->produit->creer||$user->rights->service->creer,$typeformat);
                print '</td></tr>';
            }

            if ($showbarcode)
            {
                // Barcode type
                print '<tr><td class="nowrap">';
                print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
                print $langs->trans("BarcodeType");
                print '</td>';
                if (($action != 'editbarcodetype') && ! empty($user->rights->barcode->creer)) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbarcodetype&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'),1).'</a></td>';
                print '</tr></table>';
                print '</td><td colspan="2">';
                if ($action == 'editbarcodetype')
                {
Example #12
0
     print '</td></tr>';
 }
 if ($object->client) {
     $langs->load("compta");
     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>';
     }
     print '</td></tr>';
     print '<tr>';
     print '<td>';
     print $form->editfieldkey("CustomerAccountancyCode", 'customeraccountancycode', $object->code_compta, $object, $user->rights->societe->creer);
     print '</td><td colspan="3">';
     print $form->editfieldval("CustomerAccountancyCode", 'customeraccountancycode', $object->code_compta, $object, $user->rights->societe->creer);
     print '</td>';
     print '</tr>';
 }
 // Skype
 if (!empty($conf->skype->enabled)) {
     print '<td>' . $langs->trans('Skype') . '</td><td colspan="3">' . dol_print_skype($object->skype, 0, $object->id, 'AC_SKYPE') . '</td></tr>';
 }
 // Assujeti a TVA ou pas
 print '<tr>';
 print '<td class="nowrap">' . $langs->trans('VATIsUsed') . '</td><td colspan="3">';
 print yn($object->tva_assuj);
 print '</td>';
 print '</tr>';
 // Local Taxes
 if ($mysoc->useLocalTax(1)) {
 if ($action == 'delete') {
     print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1);
 }
 /**
  * 	Invoice
  */
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/fourn/facture/list.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
 // Ref
 print '<tr><td class="nowrap" width="20%">' . $langs->trans("Ref") . '</td><td colspan="4">';
 print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
 print '</td>';
 print "</tr>\n";
 // Ref supplier
 print '<tr><td>' . $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $object->statut < 2 && $user->rights->fournisseur->facture->creer) . '</td><td colspan="4">';
 print $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $object->statut < 2 && $user->rights->fournisseur->facture->creer);
 print '</td></tr>';
 // Third party
 print '<tr><td>' . $langs->trans('Supplier') . '</td><td colspan="4">' . $societe->getNomUrl(1, 'supplier');
 print ' &nbsp; (<a href="' . DOL_URL_ROOT . '/fourn/facture/list.php?socid=' . $object->socid . '">' . $langs->trans('OtherBills') . '</a>)</td>';
 print '</tr>';
 // Type
 print '<tr><td>' . $langs->trans('Type') . '</td><td colspan="4">';
 print $object->getLibType();
 if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) {
     $facreplaced = new FactureFournisseur($db);
     $facreplaced->fetch($object->fk_facture_source);
     print ' (' . $langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)) . ')';
 }
 if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
     $facusing = new FactureFournisseur($db);
Example #14
0
     print '<td colspan="3">';
     print $object->datee ? dol_print_date($object->datee, 'daytext') : '&nbsp;';
     print '</td>';
     print '</tr>';
     // Date Terminate/close
     print '<tr><td>' . $langs->trans("Datet") . '</td>';
     print '<td colspan="3">';
     print $object->datet ? dol_print_date($object->datet, 'daytext') : '&nbsp;';
     print '</td>';
     print '</tr>';
 }
 // Description (must be a textarea and not html must be allowed (used in list view)
 print '<tr><td>';
 print $form->editfieldkey("Description", 'description', $object->description, $object, $user->rights->ficheinter->creer, 'textarea');
 print '</td><td colspan="3">';
 print $form->editfieldval("Description", 'description', $object->description, $object, $user->rights->ficheinter->creer, 'textarea:8:80');
 print '</td>';
 print '</tr>';
 // Project
 if (!empty($conf->projet->enabled)) {
     $langs->load('projects');
     print '<tr>';
     print '<td>';
     print '<table class="nobordernopadding" width="100%"><tr><td>';
     print $langs->trans('Project');
     print '</td>';
     if ($action != 'classify') {
         print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=classify&amp;id=' . $object->id . '">';
         print img_edit($langs->trans('SetProject'), 1);
         print '</a></td>';
     }
         $nbrow++;
     }
 }
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/fourn/commande/liste.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
 // Ref
 print '<tr><td width="20%">' . $langs->trans("Ref") . '</td>';
 print '<td colspan="2">';
 print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
 print '</td>';
 print '</tr>';
 // Ref supplier
 print '<tr><td>';
 print $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer);
 print '</td><td colspan="2">';
 print $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer);
 print '</td></tr>';
 // Fournisseur
 print '<tr><td>' . $langs->trans("Supplier") . "</td>";
 print '<td colspan="2">' . $object->thirdparty->getNomUrl(1, 'supplier') . '</td>';
 print '</tr>';
 // Statut
 print '<tr>';
 print '<td>' . $langs->trans("Status") . '</td>';
 print '<td colspan="2">';
 print $object->getLibStatut(4);
 print "</td></tr>";
 // Date
 if ($object->methode_commande_id > 0) {
     print '<tr><td>' . $langs->trans("Date") . '</td><td colspan="2">';
     if ($object->date_commande) {
Example #16
0
 }
 // Print form confirm
 print $formconfirm;
 /**
  * 	Invoice
  */
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/fourn/facture/list.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
 // Ref
 print '<tr><td class="nowrap" width="20%">' . $langs->trans("Ref") . '</td><td colspan="4">';
 print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
 print '</td>';
 print "</tr>\n";
 // Ref supplier
 print '<tr><td>' . $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $object->statut < FactureFournisseur::STATUS_CLOSED && $user->rights->fournisseur->facture->creer) . '</td><td colspan="4">';
 print $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $object->statut < FactureFournisseur::STATUS_CLOSED && $user->rights->fournisseur->facture->creer);
 print '</td></tr>';
 // Third party
 print '<tr><td>' . $langs->trans('Supplier') . '</td><td colspan="4">' . $societe->getNomUrl(1, 'supplier');
 print ' &nbsp; (<a href="' . DOL_URL_ROOT . '/fourn/facture/list.php?socid=' . $object->socid . '">' . $langs->trans('OtherBills') . '</a>)</td>';
 print '</tr>';
 // Type
 print '<tr><td>' . $langs->trans('Type') . '</td><td colspan="4">';
 print $object->getLibType();
 if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) {
     $facreplaced = new FactureFournisseur($db);
     $facreplaced->fetch($object->fk_facture_source);
     print ' (' . $langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)) . ')';
 }
 if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
     $facusing = new FactureFournisseur($db);
Example #17
0
			if ($product->isservice()) $nblignes++;
			else $nblignes+=4;

			if ($isphoto)
			{
				// Photo
				print '<td valign="middle" align="center" width="25%" rowspan="'.$nblignes.'">';
				print $product->show_photos($conf->product->dir_output,1,1,0,0,0,80);
				print '</td>';
			}

			print '</tr>';

			// Accountancy sell code
			print '<tr><td>'.$html->editfieldkey("ProductAccountancySellCode",'productaccountancycodesell',$product->accountancy_code_sell,'id',$product->id,$user->rights->produit->creer).'</td><td colspan="2">';
			print $html->editfieldval("ProductAccountancySellCode",'productaccountancycodesell',$product->accountancy_code_sell,'id',$product->id,$user->rights->produit->creer);
			print '</td></tr>';

			// Accountancy buy code
			print '<tr><td>'.$html->editfieldkey("ProductAccountancyBuyCode",'productaccountancycodebuy',$product->accountancy_code_buy,'id',$product->id,$user->rights->produit->creer).'</td><td colspan="2">';
			print $html->editfieldval("ProductAccountancyBuyCode",'productaccountancycodebuy',$product->accountancy_code_buy,'id',$product->id,$user->rights->produit->creer);
			print '</td></tr>';

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

			// Status (to buy)
			print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td colspan="2">';
			print $product->getLibStatut(2,1);
Example #18
0
     print $object->date_delivery ? dol_print_date($object->date_delivery, 'dayhourtext') : '&nbsp;';
 }
 print '</td>';
 print '</tr>';
 // Delivery address
 if ($origin == 'commande' && $conf->global->COMMANDE_ADD_DELIVERY_ADDRESS || $origin == 'propal' && $conf->global->PROPAL_ADD_DELIVERY_ADDRESS) {
     print '<tr><td>' . $langs->trans('DeliveryAddress') . '</td>';
     print '<td colspan="3">';
     if (!empty($object->fk_delivery_address)) {
         $html->form_address($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_delivery_address, $object->deliveryaddress->socid, 'none', 'shipment', $object->id);
     }
     print '</td></tr>' . "\n";
 }
 // Weight
 print '<tr><td>' . $html->editfieldkey("Weight", 'trueWeight', $object->trueWeight, 'id', $object->id, $user->rights->expedition->creer) . '</td><td colspan="3">';
 print $html->editfieldval("Weight", 'trueWeight', $object->trueWeight, 'id', $object->id, $user->rights->expedition->creer);
 print $object->weight_units ? measuring_units_string($object->weight_units, "weight") : '';
 print '</td></tr>';
 // Volume Total
 print '<tr><td>' . $langs->trans("Volume") . '</td>';
 print '<td colspan="3">';
 if ($object->trueVolume) {
     // If sending volume defined
     print $object->trueVolume . ' ' . measuring_units_string($object->volumeUnit, "volume");
 } else {
     // If sending volume not defined we use sum of products
     if ($totalVolume > 0) {
         print $totalVolume . ' ';
         if ($volumeUnit < 50) {
             print measuring_units_string(0, "volume");
         } else {
Example #19
0
 }
 print '</tr></table>';
 print '</td><td colspan="5">';
 if ($action == 'editconditions') {
     $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id');
 } else {
     $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'none');
 }
 print '</td>';
 print '</tr>';
 // Delivery date
 $langs->load('deliveries');
 print '<tr><td>';
 print $form->editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer);
 print '</td><td colspan="5">';
 print $form->editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer, 'day');
 print '</td>';
 print '</tr>';
 // Delivery delay
 print '<tr><td>';
 print '<table class="nobordernopadding" width="100%"><tr><td>';
 print $langs->trans('AvailabilityPeriod');
 if (!empty($conf->commande->enabled)) {
     print ' (' . $langs->trans('AfterOrder') . ')';
 }
 print '</td>';
 if ($action != 'editavailability' && !empty($object->brouillon)) {
     print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . '</a></td>';
 }
 print '</tr></table>';
 print '</td><td colspan="5">';
Example #20
0
     print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     print '<input type="hidden" name="action" value="setremise">';
 }
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/contrat/list.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
 // Ref du contrat
 if (!empty($modCodeContract->code_auto)) {
     print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td colspan="3">';
     print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
     print "</td></tr>";
 } else {
     print '<tr>';
     print '<td  width="20%">';
     print $form->editfieldkey("Ref", 'ref', $object->ref, $object, $user->rights->contrat->creer);
     print '</td><td>';
     print $form->editfieldval("Ref", 'ref', $object->ref, $object, $user->rights->contrat->creer);
     print '</td>';
     print '</tr>';
 }
 print '<tr>';
 print '<td  width="20%">';
 print $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->contrat->creer);
 print '</td><td>';
 print $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->contrat->creer);
 print '</td>';
 print '</tr>';
 // Customer
 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 colspan="3">';
Example #21
0
     print '<tr><td>' . $langs->trans('Prefix') . '</td><td colspan="3">' . $object->prefix_comm . '</td></tr>';
 }
 if ($object->fournisseur) {
     print '<tr>';
     print '<td nowrap="nowrap">' . $langs->trans("SupplierCode") . '</td><td colspan="3">';
     print $object->code_fournisseur;
     if ($object->check_codefournisseur() != 0) {
         print ' <font class="error">(' . $langs->trans("WrongSupplierCode") . ')</font>';
     }
     print '</td>';
     print '</tr>';
     print '<tr>';
     print '<td>';
     print $form->editfieldkey("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->rights->societe->creer);
     print '</td><td colspan="3">';
     print $form->editfieldval("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->rights->societe->creer);
     print '</td>';
     print '</tr>';
 }
 // Address
 print '<tr><td valign="top">' . $langs->trans("Address") . '</td><td colspan="3">';
 dol_print_address($object->address, 'gmap', 'thirdparty', $object->id);
 print '</td></tr>';
 // Zip / Town
 print '<tr><td nowrap="nowrap">' . $langs->trans("Zip") . ' / ' . $langs->trans("Town") . '</td><td colspan="3">' . $object->zip . ($object->zip && $object->town ? ' / ' : '') . $object->town . '</td>';
 print '</tr>';
 // Country
 print '<tr><td>' . $langs->trans("Country") . '</td><td colspan="3">';
 $img = picto_from_langcode($object->country_code);
 if ($object->isInEEC()) {
     print $form->textwithpicto(($img ? $img . ' ' : '') . $object->country, $langs->trans("CountryIsInEEC"), 1, 0);
Example #22
0
if ($action == 'delete') {
    print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete', '', 0, 2);
}
/*
 * Confirmation de la validation du paiement
 */
if ($action == 'valide') {
    $facid = $_GET['facid'];
    print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id . '&amp;facid=' . $facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide', '', 0, 2);
}
print '<table class="border" width="100%">';
// Ref
print '<tr><td valign="top" width="20%">' . $langs->trans('Ref') . '</td><td colspan="3">' . $object->id . '</td></tr>';
// Date payment
print '<tr><td valign="top">' . $form->editfieldkey("Date", 'datep', $object->date, $object, $user->rights->facture->paiement) . '</td><td colspan="3">';
print $form->editfieldval("Date", 'datep', $object->date, $object, $user->rights->facture->paiement, 'datepicker', '', null, $langs->trans('PaymentDateUpdateSucceeded'));
print '</td></tr>';
// Payment type (VIR, LIQ, ...)
$labeltype = $langs->trans("PaymentType" . $object->type_code) != "PaymentType" . $object->type_code ? $langs->trans("PaymentType" . $object->type_code) : $object->type_libelle;
print '<tr><td valign="top">' . $langs->trans('PaymentMode') . '</td><td colspan="3">' . $labeltype . '</td></tr>';
// Payment numero
print '<tr><td valign="top">' . $form->editfieldkey("Numero", 'num_paiement', $object->numero, $object, $object->statut == 0 && $user->rights->fournisseur->facture->creer) . '</td><td colspan="3">';
print $form->editfieldval("Numero", 'num_paiement', $object->numero, $object, $object->statut == 0 && $user->rights->fournisseur->facture->creer, 'string', '', null, $langs->trans('PaymentNumberUpdateSucceeded'));
print '</td></tr>';
// Amount
print '<tr><td valign="top">' . $langs->trans('Amount') . '</td><td colspan="3">' . price($object->montant, '', $langs, 0, 0, -1, $conf->currency) . '</td></tr>';
// Note
print '<tr><td valign="top">' . $form->editfieldkey("Note", 'note', $object->note, $object, $user->rights->facture->paiement) . '</td><td colspan="3">';
print $form->editfieldval("Note", 'note', $object->note, $object, $user->rights->facture->paiement, 'textarea');
print '</td></tr>';
// Bank account
Example #23
0
        $i = 0;
        foreach ($facidavoir as $fid) {
            if ($i == 0) {
                print ' ';
            } else {
                print ',';
            }
            $facavoir = new FactureFournisseur($db);
            $facavoir->fetch($fid);
            print $facavoir->getNomUrl(1);
        }
        print ')';
    }
    if ($facidnext > 0) {
        $facthatreplace = new FactureFournisseur($db);
        $facthatreplace->fetch($facidnext);
        print ' (' . $langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)) . ')';
    }
    print '</td></tr>';
    // Label
    print '<tr><td>' . $form->editfieldkey("Label", 'label', $object->label, $object, 0) . '</td><td colspan="3">';
    print $form->editfieldval("Label", 'label', $object->label, $object, 0);
    print '</td></tr>';
    print "</table>";
    print '<br>';
    $colwidth = 20;
    include DOL_DOCUMENT_ROOT . '/core/tpl/notes.tpl.php';
    dol_fiche_end();
}
llxFooter();
$db->close();
Example #24
0
 $soc = new Societe($db);
 if ($object->socid) {
     $soc->fetch($object->socid);
 }
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/compta/deplacement/list.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
 // Ref
 print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td>';
 print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
 print '</td></tr>';
 $form->load_cache_types_fees();
 // Type
 print '<tr><td>';
 print $form->editfieldkey("Type", 'type', $langs->trans($object->type), $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'select:types_fees');
 print '</td><td>';
 print $form->editfieldval("Type", 'type', $form->cache_types_fees[$object->type], $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'select:types_fees');
 print '</td></tr>';
 // Who
 print '<tr><td>' . $langs->trans("Person") . '</td><td>';
 $userfee = new User($db);
 $userfee->fetch($object->fk_user);
 print $userfee->getNomUrl(1);
 print '</td></tr>';
 // Date
 print '<tr><td>';
 print $form->editfieldkey("Date", 'dated', $object->date, $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'datepicker');
 print '</td><td>';
 print $form->editfieldval("Date", 'dated', $object->date, $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'datepicker');
 print '</td></tr>';
 // Km/Price
 print '<tr><td valign="top">';
Example #25
0
$labeltype=$langs->trans("PaymentType".$paiement->type_code)!=("PaymentType".$paiement->type_code)?$langs->trans("PaymentType".$paiement->type_code):$paiement->type_libelle;
print '<tr><td valign="top">'.$langs->trans('Mode').'</td><td colspan="3">'.$labeltype.'</td></tr>';

// Numero
//if ($paiement->montant)
//{
	print '<tr><td valign="top">'.$langs->trans('Numero').'</td><td colspan="3">'.$paiement->numero.'</td></tr>';
//}

// Amount
print '<tr><td valign="top">'.$langs->trans('Amount').'</td><td colspan="3">'.price($paiement->montant).'&nbsp;'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';


// Note
print '<tr><td valign="top">'.$html->editfieldkey("Note",'note',$paiement->note,'id',$paiement->id,$user->rights->facture->paiement).'</td><td colspan="3">';
print $html->editfieldval("Note",'note',$paiement->note,'id',$paiement->id,$user->rights->facture->paiement,'text');
print '</td></tr>';

// Bank account
if ($conf->banque->enabled)
{
    if ($paiement->bank_account)
    {
    	$bankline=new AccountLine($db);
    	$bankline->fetch($paiement->bank_line);

    	print '<tr>';
    	print '<td>'.$langs->trans('BankTransactionLine').'</td>';
		print '<td colspan="3">';
		print $bankline->getNomUrl(1,0,'showall');
    	print '</td>';