diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 21a65fa03b1..e2444501f7a 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -237,7 +237,7 @@ if ($_POST['action'] == 'addmilestone') if ($_POST['milestone_label'] == $langs->trans('Label') || $_POST['milestone_desc'] == $langs->trans('Description')) { $milestone_error++; - $mesg = '
| '.$langs->trans('Description').' | '; - if ($conf->global->PRODUIT_USE_MARKUP) - { - print ''.$langs->trans('Markup').' | '; - } - print ''.$langs->trans('VAT').' | '; - print ''.$langs->trans('PriceUHT').' | '; - print ''.$langs->trans('Qty').' | '; - print ''.$langs->trans('ReductionShort').' | '; - print ''.$langs->trans('TotalHTShort').' | '; - print ''; - print " | ||||||||||
| ';
- print ''; // ancre pour retourner sur la ligne;
-
- // Show product and description
- $product_static->type=$objp->fk_product_type;
- $product_static->id=$objp->fk_product;
- $product_static->ref=$objp->ref;
- $product_static->libelle=$objp->product_label;
- $text=$product_static->getNomUrl(1);
- $text.= ' - '.$objp->product_label;
- $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($objp->description));
- print $html->textwithtooltip($text,$description,3,'','',$i);
-
- // Show range
- print_date_range($db->jdate($objp->date_start),$db->jdate($objp->date_end));
-
- // Add description in form
- if ($conf->global->PRODUIT_DESC_IN_FORM)
- {
- print ($objp->description && $objp->description!=$objp->product_label)?' '.dol_htmlentitiesbr($objp->description):''; - } - - print ' | ';
- }
- else
- {
- print ''; - print ''; // ancre pour retourner sur la ligne - if (($objp->info_bits & 2) == 2) - { - print ''; - print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount"); - print ''; - if ($objp->description) - { - if ($objp->description == '(CREDIT_NOTE)') - { - $discount=new DiscountAbsolute($db); - $discount->fetch($objp->fk_remise_except); - print ' - '.$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0)); - } - else - { - print ' - '.nl2br($objp->description); - } - } - } - else - { - if ($type==1) $text = img_object($langs->trans('Service'),'service'); - else $text = img_object($langs->trans('Product'),'product'); - print $text.' '.nl2br($objp->description); - - // Show range - print_date_range($db->jdate($objp->date_start),$db->jdate($objp->date_end)); - } - print " | \n"; - } - - if ($conf->global->PRODUIT_USE_MARKUP && $conf->use_javascript_ajax) - { - $formMarkup = ''."\n"; - $formMarkup.= ajax_updaterWithID("rate".$i,"markup","sellingprice_ht".$i,DOL_URL_ROOT."/product/ajaxproducts.php","&count=".$i,"working")."\n"; - - - print ''."\n";
-
- print ''."\n";
-
-
- print '
| ';
- }
-
- // VAT Rate
- print ''.vatrate($objp->tva_tx,'%',$objp->info_bits).' | '; - - // U.P HT - print ''.price($objp->subprice)." | \n"; - - // Qty - print ''; - if ((($objp->info_bits & 2) != 2) && $objp->special_code != 3) - { - print $objp->qty; - } - else print ' '; - print ' | '; - - // Remise percent (negative or positive) - if (!empty($objp->remise_percent) && $objp->special_code != 3) - { - print ''.dol_print_reduction($objp->remise_percent,$langs)." | \n"; - } - else - { - print ''; - } - - // Montant total HT - if ($objp->special_code == 3) - { - // Si ligne en option - print ' | '.$langs->trans('Option').' | '; - } - else - { - print ''.price($objp->total_ht)." | \n"; - } - - // Icone d'edition et suppression - if ($propal->statut == 0 && $user->rights->propale->creer) - { - print ''; - if (($objp->info_bits & 2) == 2) - { - // Ligne remise predefinie, on permet pas modif - } - else - { - print 'id.'&action=editline&lineid='.$objp->rowid.'#'.$objp->rowid.'">'; - print img_edit(); - print ''; - } - print ' | '; - print ''; - print 'id.'&action=ask_deleteline&lineid='.$objp->rowid.'">'; - print img_delete(); - print ' | '; - if ($num > 1) - { - print ''; - if ($i > 0) - { - print 'id.'&action=up&rowid='.$objp->rowid.'">'; - print img_up(); - print ''; - } - if ($i < $num-1) - { - print 'id.'&action=down&rowid='.$objp->rowid.'">'; - print img_down(); - print ''; - } - print ' | '; - } - } - else - { - print ''; - } - - print ' | ||||
| '.$langs->trans('Description').' | '; + if ($conf->global->PRODUIT_USE_MARKUP) print ''.$langs->trans('Markup').' | '; + print ''.$langs->trans('VAT').' | '; + print ''.$langs->trans('PriceUHT').' | '; + print ''.$langs->trans('Qty').' | '; + print ''.$langs->trans('ReductionShort').' | '; + print ''.$langs->trans('TotalHTShort').' | '; + print ''; + print " | ||||||||||
| ';
+ print ''; // ancre pour retourner sur la ligne;
+
+ // Show product and description
+ $product_static->type=$line->fk_product_type;
+ $product_static->id=$line->fk_product;
+ $product_static->ref=$line->ref;
+ $product_static->libelle=$line->product_label;
+ $text=$product_static->getNomUrl(1);
+ $text.= ' - '.$line->product_label;
+ $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->description));
+ print $html->textwithtooltip($text,$description,3,'','',$i);
+
+ // Show range
+ print_date_range($line->date_start, $line->date_end);
+
+ // Add description in form
+ if ($conf->global->PRODUIT_DESC_IN_FORM)
+ {
+ print ($line->description && $line->description!=$line->product_label)?' '.dol_htmlentitiesbr($line->description):''; + } + + print ' | ';
+ }
+ else
+ {
+ print ''; + print ''; // ancre pour retourner sur la ligne + if (($line->info_bits & 2) == 2) + { + print ''; + print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount"); + print ''; + if ($line->description) + { + if ($line->description == '(CREDIT_NOTE)') + { + $discount=new DiscountAbsolute($db); + $discount->fetch($line->fk_remise_except); + print ' - '.$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0)); + } + else + { + print ' - '.nl2br($line->description); + } + } + } + else + { + if ($type==1) $text = img_object($langs->trans('Service'),'service'); + else $text = img_object($langs->trans('Product'),'product'); + print $text.' '.nl2br($line->description); + + // Show range + print_date_range($db->jdate($line->date_start),$db->jdate($line->date_end)); + } + print " | \n"; + } + + if ($conf->global->PRODUIT_USE_MARKUP && $conf->use_javascript_ajax) + { + // TODO a déplacer dans classe module marge + $formMarkup = ''."\n"; + $formMarkup.= ajax_updaterWithID("rate".$i,"markup","sellingprice_ht".$i,DOL_URL_ROOT."/product/ajaxproducts.php","&count=".$i,"working")."\n"; + + + print ''."\n";
+
+ print ''."\n";
+
+ print '
| ';
+ }
+
+ // VAT Rate
+ print ''.vatrate($line->tva_tx,'%',$line->info_bits).' | '; + + // U.P HT + print ''.price($line->subprice)." | \n"; + + // Qty + print ''; + if ((($line->info_bits & 2) != 2) && $line->special_code != 3) + { + print $line->qty; + } + else print ' '; + print ' | '; + + // Remise percent (negative or positive) + if (!empty($line->remise_percent) && $line->special_code != 3) + { + print ''.dol_print_reduction($line->remise_percent,$langs)." | \n"; + } + else + { + print ''; + } + + // Montant total HT + if ($line->special_code == 3) + { + // Si ligne en option + print ' | '.$langs->trans('Option').' | '; + } + else + { + print ''.price($line->total_ht)." | \n"; + } + + // Icone d'edition et suppression + if ($propal->statut == 0 && $user->rights->propale->creer) + { + print ''; + if (($line->info_bits & 2) == 2) + { + // Ligne remise predefinie, on permet pas modif + } + else + { + print 'id.'&action=editline&lineid='.$line->id.'#'.$line->id.'">'; + print img_edit(); + print ''; + } + print ' | '; + print ''; + print 'id.'&action=ask_deleteline&lineid='.$line->id.'">'; + print img_delete(); + print ' | '; + if ($num > 1) + { + print ''; + if ($i > 0) + { + print 'id.'&action=up&rowid='.$line->id.'">'; + print img_up(); + print ''; + } + if ($i < $num-1) + { + print 'id.'&action=down&rowid='.$line->id.'">'; + print img_down(); + print ''; + } + print ' | '; + } + } + else + { + print ''; + } + + print ' | ||||