diff --git a/ChangeLog b/ChangeLog
index ba9eef93f64..55ab5506633 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -136,7 +136,9 @@ Fix: Bad rounding on margin calculations and display.
Fix: Option drop table into backup was broken.
Fix: [ bug #1105 ] Searching Boxes other search option
Fix: wrong buy price update
-Fix :[ bug #1142 ] Set paiement on invoice (PGSql)
+Fix: [ bug #1142 ] Set paiement on invoice (PGSql)
+Fix: [ bug #1145 ] Agenda button list type do not display
+Fix: [ bug #1148 ] Product consomation : supplier order bad status
***** ChangeLog for 3.4.1 compared to 3.4.0 *****
Fix: Display buying price on line edit when no supplier price is defined
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index 57986f3bb31..d6273caec17 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -495,11 +495,12 @@ if ($nboftargetok) {
$newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev
$newbuild =~ s/beta/0.2.beta1/gi; # beta
$newbuild =~ s/rc./0.3.rc1/gi; # rc
- if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
+ if ($newbuild !~ /-/) { $newbuild.='-0.3'; } # finale
#$newbuild =~ s/(dev|alpha)/0/gi; # dev
#$newbuild =~ s/beta/1/gi; # beta
#$newbuild =~ s/rc./2/gi; # rc
#if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
+ #print "newbuild=".$newbuild."\n";exit;
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index f89142fe274..59a258289f4 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -195,7 +195,7 @@ class Form
}
else
{
- if ($typeofdata == 'email') $ret.=dol_print_email($value,0,0,0,0,1);
+ if ($typeofdata == 'email') $ret.=dol_print_email($value,0,0,0,0,1);
elseif ($typeofdata == 'amount') $ret.=($value != '' ? price($value,'',$langs) : '');
elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) $ret.=dol_htmlentitiesbr($value);
elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret.=dol_print_date($value,'day');
diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php
index 26434af9c22..727f169582b 100644
--- a/htdocs/core/lib/agenda.lib.php
+++ b/htdocs/core/lib/agenda.lib.php
@@ -43,129 +43,125 @@
* @param string $actioncode Preselected value of actioncode for filter on type
* @return void
*/
-function print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,$filtera,$filtert,$filterd,$pid,$socid,$showextcals=array(),$actioncode='')
-{
- global $conf,$user,$langs,$db;
+function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $showextcals=array(), $actioncode='') {
+ global $conf, $user, $langs, $db;
+
// Filters
- if ($canedit || ! empty($conf->projet->enabled))
+ print '
';
}
diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php
index 806a745e20b..041235682d2 100644
--- a/htdocs/core/lib/ajax.lib.php
+++ b/htdocs/core/lib/ajax.lib.php
@@ -146,11 +146,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
}
// Update an input
if (ui.item.update) {
- // clear old data before update
- $.each(ui.item.update, function(key, value) {
- $("#" + key).val("");
- });
- // update fields
+ // loop on each "update" fields
$.each(ui.item.update, function(key, value) {
$("#" + key).val(value).trigger("change");
});
diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php
index 8a5e84fc41e..1aab076bf06 100644
--- a/htdocs/fourn/commande/fiche.php
+++ b/htdocs/fourn/commande/fiche.php
@@ -1226,9 +1226,9 @@ elseif (! empty($object->id))
// Ref supplier
print '| ';
- print $form->editfieldkey("RefSupplier",'ref_supplier',$langs->trans($object->ref_supplier),$object,$user->rights->fournisseur->commande->creer);
+ print $form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->fournisseur->commande->creer);
print ' | ';
- print $form->editfieldval("RefSupplier",'ref_supplier',$langs->trans($object->ref_supplier),$object,$user->rights->fournisseur->commande->creer);
+ print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->fournisseur->commande->creer);
print ' |
';
// Fournisseur
@@ -1678,9 +1678,9 @@ elseif (! empty($object->id))
print '';
$ajaxoptions=array(
- 'update' => array('qty_predef' => 'qty_predef', 'remise_percent_predef' => 'remise_percent_predef'),
- 'option_disabled' => 'addPredefinedProductButton',
- 'error' => $langs->trans("NoPriceDefinedForThisSupplier")
+ 'update' => array('qty_predef'=>'qty','remise_percent_predef' => 'discount'), // html id tag will be edited with which ajax json response key
+ 'option_disabled' => 'addPredefinedProductButton', // html id to disable once select is done
+ 'error' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'error'
);
$form->select_produits_fournisseurs($object->fourn_id, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions);
diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php
index 18c515ac34e..396e5155818 100644
--- a/htdocs/fourn/facture/fiche.php
+++ b/htdocs/fourn/facture/fiche.php
@@ -2116,9 +2116,9 @@ else
print ' | ';
$ajaxoptions=array(
- 'update' => array('qty_predef' => 'qty_predef', 'remise_percent_predef' => 'remise_percent_predef'),
- 'disabled' => 'addPredefinedProductButton',
- 'error' => $langs->trans("NoPriceDefinedForThisSupplier")
+ 'update' => array('qty_predef'=>'qty','remise_percent_predef' => 'discount'), // html id tag will be edited with which ajax json response key
+ 'disabled' => 'addPredefinedProductButton', // html id to disable once select is done
+ 'error' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'error'
);
$form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions);
diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php
index aafe01bbb01..e3ba408bc16 100644
--- a/htdocs/product/admin/product_tools.php
+++ b/htdocs/product/admin/product_tools.php
@@ -107,7 +107,7 @@ if ($action == 'convert')
$newlevel=$level;
//print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr \n";
- $retm=$objectstatic->updatePrice($newprice, $price_base_type, $user, $newvat, $newminprice, $newlevel, $newnpr);
+ $retm=$objectstatic->updatePrice($objectstatic->id, $newprice, $price_base_type, $user, $newvat, $newminprice, $newlevel, $newnpr);
if ($retm < 0)
{
$error++;
@@ -136,7 +136,7 @@ if ($action == 'convert')
if (! empty($price_base_type) && ! $updatelevel1)
{
//print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr \n";
- $ret=$objectstatic->updatePrice($newprice, $price_base_type, $user, $newvat, $newminprice, $newlevel, $newnpr);
+ $ret=$objectstatic->updatePrice($objectstatic->id,$newprice, $price_base_type, $user, $newvat, $newminprice, $newlevel, $newnpr);
}
if ($ret < 0 || $retm < 0) $error++;
diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php
index d240c256111..5c0e0463da1 100644
--- a/htdocs/product/stats/commande_fournisseur.php
+++ b/htdocs/product/stats/commande_fournisseur.php
@@ -25,7 +25,7 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$langs->load("orders");
@@ -145,8 +145,8 @@ if ($id > 0 || ! empty($ref))
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
print "\n";
- $commandestatic=new Commande($db);
-
+ $commandestatic=new CommandeFournisseur($db);
+
if ($num > 0)
{
$var=True;
@@ -154,17 +154,19 @@ if ($id > 0 || ! empty($ref))
{
$objp = $db->fetch_object($result);
$var=!$var;
+
+ $commandestatic->id=$objp->commandeid;
+ $commandestatic->ref=$objp->ref;
+ $commandestatic->statut=$objp->statut;
print " | ";
- print '| '.img_object($langs->trans("ShowOrder"),"order").' ';
- print $objp->ref;
+ print ' | '.$commandestatic->getNomUrl(1)." | \n";
print "\n";
print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).' | ';
print "".$objp->code_client." | \n";
- print "";
- print dol_print_date($db->jdate($objp->date_commande))." | ";
- print "".price($objp->total_ht)." | \n";
- print ''.$commandestatic->LibStatut($objp->statut,$objp->facture,5).' | ';
+ print ''.dol_print_date($db->jdate($objp->date_commande))." | ";
+ print ''.price($objp->total_ht)." | \n";
+ print ''.$commandestatic->getLibStatut(4).' | ';
print "
\n";
$i++;
}