';
// Reference
- print '| '.$langs->trans('Ref').' | '.$langs->trans("Draft").' |
';
+ print '| ' . $langs->trans('Ref') . ' | ' . $langs->trans("Draft") . ' |
';
// Ref customer
- print '| '.$langs->trans('RefCustomer').' | ';
- print ' | ';
+ print '
| ' . $langs->trans('RefCustomer') . ' | ';
+ print ' | ';
print '
';
// Third party
print '';
- print '| '.$langs->trans('Customer').' | ';
+ print '' . $langs->trans('Customer') . ' | ';
$shipping_method_id = 0;
$warehouse_id = 0;
if ($socid > 0) {
print '';
print $soc->getNomUrl(1, 'customer');
- print '';
+ print '';
print ' | ';
if (getDolGlobalString('SOCIETE_ASK_FOR_SHIPPING_METHOD') && !empty($soc->shipping_method_id)) {
$shipping_method_id = $soc->shipping_method_id;
@@ -2362,7 +2364,7 @@ if ($action == 'create') {
} else {
print '';
$filter = '((s.client:IN:1,2,3) AND (s.status:=:1))';
- print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 maxwidth500 widthcentpercentminusxx');
+ print img_picto('', 'company', 'class="pictofixedwidth"') . $form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 maxwidth500 widthcentpercentminusxx');
// reload page to retrieve customer information
if (!getDolGlobalString('RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED')) {
print '';
}
- print ' ';
+ print ' ';
print ' | ';
}
- print '
'."\n";
+ print '' . "\n";
if ($socid > 0) {
// Contacts (ask contact only if thirdparty already defined).
- print '| '.$langs->trans("DefaultContact").' | ';
+ print ' |
| ' . $langs->trans("DefaultContact") . ' | ';
print img_picto('', 'contact', 'class="pictofixedwidth"');
//print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, '', '', 0, 'minwidth300 widthcentpercentminusx');
print $form->select_contact($soc->id, $contactid, 'contactid', 1, '', '', 1, 'maxwidth300 widthcentpercentminusx', true);
print ' |
';
// Third party discounts info line
- print '| '.$langs->trans('Discounts').' | ';
+ print ' |
| ' . $langs->trans('Discounts') . ' | ';
$absolute_discount = $soc->getAvailableDiscounts();
$thirdparty = $soc;
$discount_type = 0;
- $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid')));
- include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
+ $backtopage = $_SERVER["PHP_SELF"] . '?socid=' . $thirdparty->id . '&action=' . $action . '&origin=' . urlencode((string) (GETPOST('origin'))) . '&originid=' . urlencode((string) (GETPOSTINT('originid')));
+ include DOL_DOCUMENT_ROOT . '/core/tpl/object_discounts.tpl.php';
print ' |
';
}
$newdatepropal = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver');
// Date
- print '| '.$langs->trans('DatePropal').' | ';
+ print ' |
| ' . $langs->trans('DatePropal') . ' | ';
print img_picto('', 'action', 'class="pictofixedwidth"');
print $form->selectDate($newdatepropal ? $newdatepropal : $datepropal, '', 0, 0, 0, "addprop", 1, 1);
print ' |
';
// Validaty duration
- print '| '.$langs->trans("ValidityDuration").' | '.img_picto('', 'clock', 'class="pictofixedwidth"').' '.$langs->trans("days").' |
';
+ print '| ' . $langs->trans("ValidityDuration") . ' | ' . img_picto('', 'clock', 'class="pictofixedwidth"') . ' ' . $langs->trans("days") . ' |
';
// Terms of payment
- print '| '.$langs->trans('PaymentConditionsShort').' | ';
+ print ' |
| ' . $langs->trans('PaymentConditionsShort') . ' | ';
print img_picto('', 'payment', 'class="pictofixedwidth"');
// at last resort we take the payment term id which may be filled by default values set (if not getpostisset)
print $form->getSelectConditionsPaiements($cond_reglement_id, 'cond_reglement_id', 1, 1, 0, '', $deposit_percent);
print ' |
';
// Mode of payment
- print '| '.$langs->trans('PaymentMode').' | ';
+ print ' |
| ' . $langs->trans('PaymentMode') . ' | ';
print img_picto('', 'bank', 'class="pictofixedwidth"');
print $form->select_types_paiements((string) $mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1);
print ' |
';
// Bank Account
if (getDolGlobalString('BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') && isModEnabled("bank")) {
- print '| '.$langs->trans('BankAccount').' | ';
- print img_picto('', 'bank_account', 'class="pictofixedwidth"').$form->select_comptes($fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1);
+ print ' |
| ' . $langs->trans('BankAccount') . ' | ';
+ print img_picto('', 'bank_account', 'class="pictofixedwidth"') . $form->select_comptes($fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1);
print ' |
';
}
// Source / Channel - What trigger creation
- print '| '.$langs->trans('Source').' | ';
+ print ' |
| ' . $langs->trans('Source') . ' | ';
print img_picto('', 'question', 'class="pictofixedwidth"');
$form->selectInputReason((GETPOSTISSET('demand_reason_id') ? GETPOSTINT('demand_reason_id') : ''), 'demand_reason_id', "SRC_PROP", 1, 'maxwidth200 widthcentpercentminusx');
print ' |
';
@@ -2444,7 +2446,7 @@ if ($action == 'create') {
if (getDolGlobalString('SOCIETE_ASK_FOR_SHIPPING_METHOD') && !empty($soc->shipping_method_id)) {
$shipping_method_id = $soc->shipping_method_id;
}
- print '| '.$langs->trans('SendingMethod').' | ';
+ print ' |
| ' . $langs->trans('SendingMethod') . ' | ';
print img_picto('', 'dolly', 'class="pictofixedwidth"');
$form->selectShippingMethod((string) (GETPOSTISSET('shipping_method_id') ? GETPOSTINT('shipping_method_id') : $shipping_method_id), 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx');
print ' |
';
@@ -2453,17 +2455,17 @@ if ($action == 'create') {
$formproduct = null;
// Warehouse
if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL')) {
- require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
+ require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
$formproduct = new FormProduct($db);
- print '| '.$langs->trans('Warehouse').' | ';
- print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($warehouse_id, 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx');
+ print ' |
| ' . $langs->trans('Warehouse') . ' | ';
+ print img_picto('', 'stock', 'class="pictofixedwidth"') . $formproduct->selectWarehouses($warehouse_id, 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx');
print ' |
';
}
// Delivery delay
- print '| '.$langs->trans('AvailabilityPeriod');
+ print ' |
| ' . $langs->trans('AvailabilityPeriod');
if (isModEnabled('order')) {
- print ' ('.$langs->trans('AfterOrder').')';
+ print ' (' . $langs->trans('AfterOrder') . ')';
}
print ' | ';
print img_picto('', 'clock', 'class="pictofixedwidth"');
@@ -2471,7 +2473,7 @@ if ($action == 'create') {
print ' |
';
// Delivery date (or manufacturing)
- print '| '.$langs->trans("DeliveryDate").' | ';
+ print '
| ' . $langs->trans("DeliveryDate") . ' | ';
print '';
print img_picto('', 'action', 'class="pictofixedwidth"');
if (is_numeric(getDolGlobalString('DATE_LIVRAISON_WEEK_DELAY'))) { // If value set to 0 or a num, not empty
@@ -2479,7 +2481,7 @@ if ($action == 'create') {
$syear = date("Y", $tmpdte);
$smonth = date("m", $tmpdte);
$sday = date("d", $tmpdte);
- print $form->selectDate($syear."-".$smonth."-".$sday, 'date_livraison', 0, 0, 0, "addprop");
+ print $form->selectDate($syear . "-" . $smonth . "-" . $sday, 'date_livraison', 0, 0, 0, "addprop");
} else {
$tmp_date_delivery = GETPOST('date_delivery') ?: -1;
print $form->selectDate($tmp_date_delivery, 'date_livraison', 0, 0, 0, "addprop", 1, 1);
@@ -2490,9 +2492,9 @@ if ($action == 'create') {
if (isModEnabled('project') && is_object($formproject)) {
$langs->load("projects");
print ' |
';
- print '| '.$langs->trans("Project").' | ';
- print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), (string) $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
- print ' id).'">';
+ print ' | ' . $langs->trans("Project") . ' | ';
+ print img_picto('', 'project', 'class="pictofixedwidth"') . $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), (string) $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
+ print ' id) . '">';
print ' | ';
print '
';
}
@@ -2500,7 +2502,7 @@ if ($action == 'create') {
// Incoterms
if (isModEnabled('incoterm')) {
print '';
- print ' | ';
+ print ' | ';
print '';
print img_picto('', 'incoterm', 'class="pictofixedwidth"');
print $form->select_incoterms((!empty($soc->fk_incoterms) ? $soc->fk_incoterms : ''), (!empty($soc->location_incoterms) ? $soc->location_incoterms : ''));
@@ -2509,7 +2511,7 @@ if ($action == 'create') {
// Template to use by default
print ' |
';
- print '| '.$langs->trans("DefaultModel").' | ';
+ print '' . $langs->trans("DefaultModel") . ' | ';
print '';
print img_picto('', 'pdf', 'class="pictofixedwidth"');
$liste = ModelePDFPropales::liste_modeles($db);
@@ -2520,15 +2522,15 @@ if ($action == 'create') {
// Multicurrency
if (isModEnabled("multicurrency")) {
print ' |
';
- print '| '.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).' | ';
+ print '' . $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0) . ' | ';
print '';
- print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
+ print img_picto('', 'currency', 'class="pictofixedwidth"') . $form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
print ' |
';
}
// Public note
print '';
- print '| '.$langs->trans('NotePublic').' | ';
+ print '' . $langs->trans('NotePublic') . ' | ';
print '';
$note_public = $object->getDefaultCreateValueFor('note_public', (!empty($objectsrc) ? $objectsrc->note_public : (getDolGlobalString('PROPALE_ADDON_NOTE_PUBLIC_DEFAULT') ? $conf->global->PROPALE_ADDON_NOTE_PUBLIC_DEFAULT : null)), 'restricthtml');
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_3, '90%');
@@ -2537,7 +2539,7 @@ if ($action == 'create') {
// Private note
if (empty($user->socid)) {
print ' |
';
- print '| '.$langs->trans('NotePrivate').' | ';
+ print '' . $langs->trans('NotePrivate') . ' | ';
print '';
$note_private = $object->getDefaultCreateValueFor('note_private', ((!empty($origin) && !empty($originid) && is_object($objectsrc)) ? $objectsrc->note_private : null));
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_3, '90%');
@@ -2547,7 +2549,7 @@ if ($action == 'create') {
}
// Other attributes
- include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
+ include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php';
// Lines from source
if (!empty($origin) && !empty($originid) && is_object($objectsrc)) {
@@ -2559,13 +2561,13 @@ if ($action == 'create') {
$objectsrc->update_price(1, 'auto', 1);
}
- print "\n";
+ print "\n";
print "\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print '';
- print '';
+ print '' . "\n";
+ print '' . "\n";
+ print '' . "\n";
+ print '';
+ print '';
$newclassname = $classname;
if ($newclassname == 'Propal') {
@@ -2578,22 +2580,22 @@ if ($action == 'create') {
$newclassname = 'Intervention';
}
- print ' |
| '.$langs->trans($newclassname).' | '.$objectsrc->getNomUrl(1).' |
';
- print '| '.$langs->trans('AmountHT').' | '.price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency).' |
';
- print '| '.$langs->trans('AmountVAT').' | '.price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency)." |
";
+ print '| ' . $langs->trans($newclassname) . ' | ' . $objectsrc->getNomUrl(1) . ' |
';
+ print '| ' . $langs->trans('AmountHT') . ' | ' . price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . ' |
';
+ print '| ' . $langs->trans('AmountVAT') . ' | ' . price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . " |
";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) { // Localtax1
- print '| '.$langs->transcountry("AmountLT1", $mysoc->country_code).' | '.price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency)." |
";
+ print '| ' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ' | ' . price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . " |
";
}
if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) { // Localtax2
- print '| '.$langs->transcountry("AmountLT2", $mysoc->country_code).' | '.price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency)." |
";
+ print '| ' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ' | ' . price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . " |
";
}
- print '| '.$langs->trans('AmountTTC').' | '.price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency)." |
";
+ print '| ' . $langs->trans('AmountTTC') . ' | ' . price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . " |
";
if (isModEnabled("multicurrency")) {
- print '| '.$langs->trans('MulticurrencyAmountHT').' | '.price($objectsrc->multicurrency_total_ht).' |
';
- print '| '.$langs->trans('MulticurrencyAmountVAT').' | '.price($objectsrc->multicurrency_total_tva)." |
";
- print '| '.$langs->trans('MulticurrencyAmountTTC').' | '.price($objectsrc->multicurrency_total_ttc)." |
";
+ print '| ' . $langs->trans('MulticurrencyAmountHT') . ' | ' . price($objectsrc->multicurrency_total_ht) . ' |
';
+ print '| ' . $langs->trans('MulticurrencyAmountVAT') . ' | ' . price($objectsrc->multicurrency_total_tva) . " |
";
+ print '| ' . $langs->trans('MulticurrencyAmountTTC') . ' | ' . price($objectsrc->multicurrency_total_ttc) . " |
";
}
}
@@ -2614,16 +2616,16 @@ if ($action == 'create') {
// For backward compatibility
print '';
print ' | ';
- print ''.$langs->trans("CopyPropalFrom").' | ';
+ print '' . $langs->trans("CopyPropalFrom") . ' | ';
print '';
$liste_propal = array();
- $liste_propal [0] = '';
+ $liste_propal[0] = '';
$sql = "SELECT p.rowid as id, p.ref, s.nom";
- $sql .= " FROM ".MAIN_DB_PREFIX."propal p";
- $sql .= ", ".MAIN_DB_PREFIX."societe s";
+ $sql .= " FROM " . MAIN_DB_PREFIX . "propal p";
+ $sql .= ", " . MAIN_DB_PREFIX . "societe s";
$sql .= " WHERE s.rowid = p.fk_soc";
- $sql .= " AND p.entity IN (".getEntity('propal').")";
+ $sql .= " AND p.entity IN (" . getEntity('propal') . ")";
$sql .= " AND p.fk_statut <> 0";
$sql .= " ORDER BY Id";
@@ -2633,7 +2635,7 @@ if ($action == 'create') {
$i = 0;
while ($i < $num) {
$row = $db->fetch_row($resql);
- $propalRefAndSocName = $row[1]." - ".$row[2];
+ $propalRefAndSocName = $row[1] . " - " . $row[2];
$liste_propal[$row[0]] = $propalRefAndSocName;
$i++;
}
@@ -2644,7 +2646,7 @@ if ($action == 'create') {
print ' |
';
print ' | ';
- print ''.$langs->trans("CreateEmptyPropal").' |
';
+ print '' . $langs->trans("CreateEmptyPropal") . ' | ';
print '
';
}
}
@@ -2704,7 +2706,7 @@ if ($action == 'create') {
$formquestion[] = array('type' => 'date', 'name' => 'date_delivery', 'label' => $langs->trans("DeliveryDate"), 'value' => $object->delivery_date);
}
// Incomplete payment. We ask if reason = discount or other
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250, 600);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250, 600);
}
// Subtotal line form
@@ -2724,7 +2726,7 @@ if ($action == 'create') {
//Form to close proposal (signed or not)
$formquestion = array();
if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) {
- $formquestion[] = array('type' => 'select', 'name' => 'statut', 'label' => '';
// Ref customer
$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1);
- $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
+ $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string' . (isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
// Thirdparty
- $morehtmlref .= '
'.$soc->getNomUrl(1, 'customer');
+ $morehtmlref .= '
' . $soc->getNomUrl(1, 'customer');
if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $soc->id > 0) {
- $morehtmlref .= ' (
'.$langs->trans("OtherProposals").')';
+ $morehtmlref .= ' (
' . $langs->trans("OtherProposals") . ')';
}
// Project
if (isModEnabled('project')) {
@@ -2977,16 +2979,16 @@ if ($action == 'create') {
if ($usercancreate) {
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
if ($action != 'classify') {
- $morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
+ $morehtmlref .= '
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' ';
}
- $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
+ $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
} else {
if (!empty($object->fk_project)) {
$proj = new Project($db);
$proj->fetch($object->fk_project);
$morehtmlref .= $proj->getNomUrl(1);
if ($proj->title) {
- $morehtmlref .= '
- '.dol_escape_htmltag($proj->title).'';
+ $morehtmlref .= '
- ' . dol_escape_htmltag($proj->title) . '';
}
}
}
@@ -3016,7 +3018,7 @@ if ($action == 'create') {
$filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')";
}
- print '
| '.$langs->trans('Discounts').' | ';
+ print ' |
| ' . $langs->trans('Discounts') . ' | ';
$absolute_discount = $soc->getAvailableDiscounts(null, $filterabsolutediscount);
$absolute_creditnote = $soc->getAvailableDiscounts(null, $filtercreditnote);
@@ -3027,8 +3029,8 @@ if ($action == 'create') {
$thirdparty = $soc;
$discount_type = 0;
- $backtopage = $_SERVER["PHP_SELF"].'?id='.$object->id;
- include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
+ $backtopage = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
+ include DOL_DOCUMENT_ROOT . '/core/tpl/object_discounts.tpl.php';
print ' |
';
@@ -3047,12 +3049,12 @@ if ($action == 'create') {
print $form->editfieldkey("DatePropal", 'date', '', $object, (int) $editenable);
print '
';
if ($action == 'editdate' && $usercancreate && $caneditfield) {
- print '';
} else {
if ($object->date) {
@@ -3070,17 +3072,17 @@ if ($action == 'create') {
print $langs->trans('DateEndPropal');
print ' | ';
if ($action != 'editecheance' && $usercancreate && $caneditfield) {
- print '
id.'">'.img_edit($langs->trans('SetConditions'), 1).' | ';
+ print '
id . '">' . img_edit($langs->trans('SetConditions'), 1) . ' | ';
}
print '';
print '
';
if ($action == 'editecheance' && $usercancreate && $caneditfield) {
- print '';
} else {
if (!empty($object->fin_validite)) {
@@ -3101,14 +3103,14 @@ if ($action == 'create') {
print $langs->trans('PaymentConditionsShort');
print ' | ';
if ($action != 'editconditions' && $usercancreate && $caneditfield) {
- print '
id.'">'.img_edit($langs->transnoentitiesnoconv('SetConditions'), 1).' | ';
+ print '
id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . ' | ';
}
print '';
print '
';
if ($action == 'editconditions' && $usercancreate && $caneditfield) {
- $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->cond_reglement_id, 'cond_reglement_id', 0, '', 1, $object->deposit_percent);
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->cond_reglement_id, 'cond_reglement_id', 0, '', 1, $object->deposit_percent);
} else {
- $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->cond_reglement_id, 'none', 0, '', 1, $object->deposit_percent);
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->cond_reglement_id, 'none', 0, '', 1, $object->deposit_percent);
}
print ' | ';
print '';
@@ -3120,14 +3122,14 @@ if ($action == 'create') {
print $langs->trans('PaymentMode');
print '';
if ($action != 'editmode' && $usercancreate && $caneditfield) {
- print '
id.'">'.img_edit($langs->transnoentitiesnoconv('SetMode'), 1).' | ';
+ print '
id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . ' | ';
}
print '';
print '
';
if ($action == 'editmode' && $usercancreate && $caneditfield) {
- $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1);
+ $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1);
} else {
- $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->mode_reglement_id, 'none');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->mode_reglement_id, 'none');
}
print ' | ';
@@ -3144,20 +3146,20 @@ if ($action == 'create') {
print '
| ';
print '';
print ' | ';
if ($action == 'editavailability' && $usercancreate && $caneditfield) {
- $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->availability_id, 'availability_id', 1);
+ $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->availability_id, 'availability_id', 1);
} else {
- $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->availability_id, 'none', 1);
+ $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->availability_id, 'none', 1);
}
print ' | ';
@@ -3170,14 +3172,14 @@ if ($action == 'create') {
print $langs->trans('SendingMethod');
print '';
if ($action != 'editshippingmethod' && $usercancreate && $caneditfield) {
- print 'id.'">'.img_edit($langs->trans('SetShippingMode'), 1).' | ';
+ print 'id . '">' . img_edit($langs->trans('SetShippingMode'), 1) . ' | ';
}
print '
';
print '
';
if ($action == 'editshippingmethod' && $usercancreate && $caneditfield) {
- $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->shipping_method_id, 'shipping_method_id', 1);
+ $form->formSelectShippingMethod($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->shipping_method_id, 'shipping_method_id', 1);
} else {
- $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->shipping_method_id, 'none');
+ $form->formSelectShippingMethod($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->shipping_method_id, 'none');
}
print ' | ';
print '';
@@ -3186,16 +3188,16 @@ if ($action == 'create') {
// Warehouse
if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL')) {
$langs->load('stocks');
- require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
+ require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
$formproduct = new FormProduct($db);
print '
| ';
$editenable = $usercancreate;
print $form->editfieldkey("Warehouse", 'warehouse', '', $object, $editenable);
print ' | ';
if ($action == 'editwarehouse') {
- $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1);
+ $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->warehouse_id, 'warehouse_id', 1);
} else {
- $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'none');
+ $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->warehouse_id, 'none');
}
print ' | ';
print '
';
@@ -3207,14 +3209,14 @@ if ($action == 'create') {
print $langs->trans('Source');
print '';
if ($action != 'editdemandreason' && $usercancreate) {
- print '
id.'">'.img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1).' | ';
+ print '
id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . ' | ';
}
print '';
print '
';
if ($action == 'editdemandreason' && $usercancreate) {
- $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->demand_reason_id, 'demand_reason_id', 1);
+ $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->demand_reason_id, 'demand_reason_id', 1);
} else {
- $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->demand_reason_id, 'none');
+ $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->demand_reason_id, 'none');
}
print ' | ';
print '';
@@ -3226,8 +3228,8 @@ if ($action == 'create') {
print '
';
$arrayoutstandingbills = $soc->getOutstandingBills();
print($arrayoutstandingbills['opened'] > $soc->outstanding_limit ? img_warning() : '');
- print price($arrayoutstandingbills['opened']).' / ';
- print price($soc->outstanding_limit, 0, $langs, 1, - 1, - 1, $conf->currency);
+ print price($arrayoutstandingbills['opened']) . ' / ';
+ print price($soc->outstanding_limit, 0, $langs, 1, -1, -1, $conf->currency);
print ' | ';
print '';
}
@@ -3239,14 +3241,14 @@ if ($action == 'create') {
print $langs->trans('BankAccount');
print '';
if ($action != 'editbankaccount' && $usercancreate) {
- print '
id.'">'.img_edit($langs->trans('SetBankAccount'), 1).' | ';
+ print '
id . '">' . img_edit($langs->trans('SetBankAccount'), 1) . ' | ';
}
print '';
print '
';
if ($action == 'editbankaccount') {
- $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->fk_account, 'fk_account', 1);
+ $form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->fk_account, 'fk_account', 1);
} else {
- $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->fk_account, 'none');
+ $form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->fk_account, 'none');
}
print ' | ';
print '';
@@ -3257,13 +3259,13 @@ if ($action == 'create') {
$totalWeight = isset($tmparray['weight']) ? $tmparray['weight'] : 0;
$totalVolume = isset($tmparray['volume']) ? $tmparray['volume'] : 0;
if ($totalWeight) {
- print '
| '.$langs->trans("CalculatedWeight").' | ';
+ print '
| ' . $langs->trans("CalculatedWeight") . ' | ';
print '';
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT', 'no'), 1);
print ' |
';
}
if ($totalVolume) {
- print '
| '.$langs->trans("CalculatedVolume").' | ';
+ print '
| ' . $langs->trans("CalculatedVolume") . ' | ';
print '';
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'), 1);
print ' |
';
@@ -3277,7 +3279,7 @@ if ($action == 'create') {
print $langs->trans('IncotermLabel');
print '
| ';
if ($action != 'editincoterm' && $usercancreate && $caneditfield) {
- print ''.img_edit().'';
+ print '' . img_edit() . '';
} else {
print ' ';
}
@@ -3285,7 +3287,7 @@ if ($action == 'create') {
print ' | ';
print '
';
if ($action == 'editincoterm' && $usercancreate && $caneditfield) {
- print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id);
+ print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'] . '?id=' . $object->id);
} else {
print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1);
}
@@ -3293,7 +3295,7 @@ if ($action == 'create') {
}
// Other attributes
- include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
+ include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
print '';
@@ -3303,7 +3305,7 @@ if ($action == 'create') {
print '';
- include DOL_DOCUMENT_ROOT.'/core/tpl/object_currency_amount.tpl.php';
+ include DOL_DOCUMENT_ROOT . '/core/tpl/object_currency_amount.tpl.php';
print '';
print '| ' . $langs->trans('AmountHT') . ' | ';
@@ -3368,13 +3370,13 @@ if ($action == 'create') {
if (getDolGlobalString('MAIN_DISABLE_CONTACTS_TAB')) {
$blocname = 'contacts';
$title = $langs->trans('ContactsAddresses');
- include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php';
+ include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php';
}
if (getDolGlobalString('MAIN_DISABLE_NOTES_TAB')) {
$blocname = 'notes';
$title = $langs->trans('Notes');
- include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php';
+ include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php';
}
/*
@@ -3389,18 +3391,18 @@ if ($action == 'create') {
global $inputalsopricewithtax;
$inputalsopricewithtax = 1;
- print ' |