2
0
forked from Wavyzz/dolibarr

Merge remote-tracking branch 'origin/3.4' into 3.5

Conflicts:
	htdocs/core/lib/agenda.lib.php
	htdocs/product/stats/commande_fournisseur.php
This commit is contained in:
Laurent Destailleur
2013-11-28 15:54:12 +01:00
9 changed files with 143 additions and 146 deletions

View File

@@ -137,6 +137,8 @@ Fix: Option drop table into backup was broken.
Fix: [ bug #1105 ] Searching Boxes other search option Fix: [ bug #1105 ] Searching Boxes other search option
Fix: wrong buy price update 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 ***** ***** ChangeLog for 3.4.1 compared to 3.4.0 *****
Fix: Display buying price on line edit when no supplier price is defined Fix: Display buying price on line edit when no supplier price is defined

View File

@@ -495,11 +495,12 @@ if ($nboftargetok) {
$newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev $newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev
$newbuild =~ s/beta/0.2.beta1/gi; # beta $newbuild =~ s/beta/0.2.beta1/gi; # beta
$newbuild =~ s/rc./0.3.rc1/gi; # rc $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/(dev|alpha)/0/gi; # dev
#$newbuild =~ s/beta/1/gi; # beta #$newbuild =~ s/beta/1/gi; # beta
#$newbuild =~ s/rc./2/gi; # rc #$newbuild =~ s/rc./2/gi; # rc
#if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale #if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
#print "newbuild=".$newbuild."\n";exit;
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi; $REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; } if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n"; print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";

View File

@@ -43,13 +43,11 @@
* @param string $actioncode Preselected value of actioncode for filter on type * @param string $actioncode Preselected value of actioncode for filter on type
* @return void * @return void
*/ */
function print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,$filtera,$filtert,$filterd,$pid,$socid,$showextcals=array(),$actioncode='') function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $showextcals=array(), $actioncode='') {
{
global $conf, $user, $langs, $db; global $conf, $user, $langs, $db;
// Filters // Filters
if ($canedit || ! empty($conf->projet->enabled))
{
print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER ["PHP_SELF"] . '" method="POST">'; print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER ["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="status" value="' . $status . '">'; print '<input type="hidden" name="status" value="' . $status . '">';
@@ -58,8 +56,7 @@ function print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirt
print '<input type="hidden" name="day" value="' . $day . '">'; print '<input type="hidden" name="day" value="' . $day . '">';
print '<input type="hidden" name="showbirthday" value="' . $showbirthday . '">'; print '<input type="hidden" name="showbirthday" value="' . $showbirthday . '">';
print '<table class="nobordernopadding" width="100%">'; print '<table class="nobordernopadding" width="100%">';
if ($canedit || ! empty($conf->projet->enabled))
{
print '<tr><td class="nowrap">'; print '<tr><td class="nowrap">';
print '<table class="nobordernopadding">'; print '<table class="nobordernopadding">';
@@ -162,11 +159,10 @@ function print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirt
} }
print '</tr>'; print '</tr>';
}
print '</table>'; print '</table>';
print '</form>'; print '</form>';
} }
}
/** /**

View File

@@ -146,11 +146,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
} }
// Update an input // Update an input
if (ui.item.update) { if (ui.item.update) {
// clear old data before update // loop on each "update" fields
$.each(ui.item.update, function(key, value) {
$("#" + key).val("");
});
// update fields
$.each(ui.item.update, function(key, value) { $.each(ui.item.update, function(key, value) {
$("#" + key).val(value).trigger("change"); $("#" + key).val(value).trigger("change");
}); });

View File

@@ -1226,9 +1226,9 @@ elseif (! empty($object->id))
// Ref supplier // Ref supplier
print '<tr><td>'; print '<tr><td>';
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 '</td><td colspan="2">'; print '</td><td colspan="2">';
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 '</td></tr>'; print '</td></tr>';
// Fournisseur // Fournisseur
@@ -1678,9 +1678,9 @@ elseif (! empty($object->id))
print '<td colspan="3">'; print '<td colspan="3">';
$ajaxoptions=array( $ajaxoptions=array(
'update' => array('qty_predef' => 'qty_predef', 'remise_percent_predef' => 'remise_percent_predef'), 'update' => array('qty_predef'=>'qty','remise_percent_predef' => 'discount'), // html id tag will be edited with which ajax json response key
'option_disabled' => 'addPredefinedProductButton', 'option_disabled' => 'addPredefinedProductButton', // html id to disable once select is done
'error' => $langs->trans("NoPriceDefinedForThisSupplier") 'error' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'error'
); );
$form->select_produits_fournisseurs($object->fourn_id, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions); $form->select_produits_fournisseurs($object->fourn_id, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions);

View File

@@ -2116,9 +2116,9 @@ else
print '<td colspan="4">'; print '<td colspan="4">';
$ajaxoptions=array( $ajaxoptions=array(
'update' => array('qty_predef' => 'qty_predef', 'remise_percent_predef' => 'remise_percent_predef'), 'update' => array('qty_predef'=>'qty','remise_percent_predef' => 'discount'), // html id tag will be edited with which ajax json response key
'disabled' => 'addPredefinedProductButton', 'disabled' => 'addPredefinedProductButton', // html id to disable once select is done
'error' => $langs->trans("NoPriceDefinedForThisSupplier") 'error' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'error'
); );
$form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions); $form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions);

View File

@@ -107,7 +107,7 @@ if ($action == 'convert')
$newlevel=$level; $newlevel=$level;
//print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr<br>\n"; //print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr<br>\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) if ($retm < 0)
{ {
$error++; $error++;
@@ -136,7 +136,7 @@ if ($action == 'convert')
if (! empty($price_base_type) && ! $updatelevel1) if (! empty($price_base_type) && ! $updatelevel1)
{ {
//print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr<br>\n"; //print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr<br>\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++; if ($ret < 0 || $retm < 0) $error++;

View File

@@ -25,7 +25,7 @@
require '../../main.inc.php'; require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.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'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$langs->load("orders"); $langs->load("orders");
@@ -145,7 +145,7 @@ if ($id > 0 || ! empty($ref))
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&amp;id=".$product->id,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&amp;id=".$product->id,'align="right"',$sortfield,$sortorder);
print "</tr>\n"; print "</tr>\n";
$commandestatic=new Commande($db); $commandestatic=new CommandeFournisseur($db);
if ($num > 0) if ($num > 0)
{ {
@@ -155,16 +155,18 @@ if ($id > 0 || ! empty($ref))
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
$var=!$var; $var=!$var;
$commandestatic->id=$objp->commandeid;
$commandestatic->ref=$objp->ref;
$commandestatic->statut=$objp->statut;
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";
print '<td><a href="'.DOL_URL_ROOT.'/fourn/commande/fiche.php?id='.$objp->commandeid.'">'.img_object($langs->trans("ShowOrder"),"order").' '; print '<td>'.$commandestatic->getNomUrl(1)."</td>\n";
print $objp->ref;
print "</a></td>\n"; print "</a></td>\n";
print '<td><a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>'; print '<td><a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>';
print "<td>".$objp->code_client."</td>\n"; print "<td>".$objp->code_client."</td>\n";
print "<td align=\"center\">"; print '<td align="center">'.dol_print_date($db->jdate($objp->date_commande))."</td>";
print dol_print_date($db->jdate($objp->date_commande))."</td>"; print '<td align="right">'.price($objp->total_ht)."</td>\n";
print "<td align=\"right\">".price($objp->total_ht)."</td>\n"; print '<td align="right">'.$commandestatic->getLibStatut(4).'</td>';
print '<td align="right">'.$commandestatic->LibStatut($objp->statut,$objp->facture,5).'</td>';
print "</tr>\n"; print "</tr>\n";
$i++; $i++;
} }