Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0

Conflicts:
	htdocs/compta/paiement.php
	htdocs/product/fournisseurs.php
	htdocs/stripe/payment.php
This commit is contained in:
Laurent Destailleur 2019-08-22 12:39:07 +02:00
commit 27cd6cd308
5 changed files with 44 additions and 22 deletions

View File

@ -312,7 +312,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if(empty($reshook)){
print $hookmanager->resPrint;
$solde = isset($hookmanager->resArray['solde']) ? $hookmanager->resArray['solde'] : $solde;
$solde = isset($hookmanager->resArray['solde']) ? $hookmanager->resArray['solde'] : $solde;
}
// solde

View File

@ -744,6 +744,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
print "</td>";
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
// Warning
print '<td align="center" width="16">';
//print "xx".$amounts[$invoice->id]."-".$amountsresttopay[$invoice->id]."<br>";
@ -754,9 +757,6 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
print '</td>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
print "</tr>\n";
$total+=$objp->total;
@ -893,12 +893,13 @@ if (! GETPOST('action', 'aZ09'))
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$objp->facid.'">'.$objp->ref."</a></td>\n";
print '<td>'.dol_print_date($db->jdate($objp->dp))."</td>\n";
print '<td>'.$objp->paiement_type.' '.$objp->num_paiement."</td>\n";
print '<td class="right">'.price($objp->amount).'</td><td>&nbsp;</td>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
print '<td class="right">'.price($objp->amount).'</td>';
print '<td>&nbsp;</td>';
print '</tr>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
$i++;
}
print '</table>';

View File

@ -172,7 +172,8 @@ function societe_prepare_head(Societe $object)
}
// Related items
if (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->ficheinter->enabled) || ! empty($conf->fournisseur->enabled))
if ((! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->ficheinter->enabled) || ! empty($conf->fournisseur->enabled))
&& empty($conf->global->THIRPARTIES_DISABLE_RELATED_OBJECT_TAB))
{
$head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Referers");

View File

@ -811,12 +811,16 @@ SCRIPT;
print_liste_field_titre("BarcodeType", $_SERVER["PHP_SELF"], "pfp.fk_barcode_type", "", $param, '', $sortfield, $sortorder, 'center ');
}
print_liste_field_titre("DateModification", $_SERVER["PHP_SELF"], "pfp.tms", "", $param, '', $sortfield, $sortorder, 'right ');
if (is_object($hookmanager))
{
$parameters=array('id_fourn'=>$id_fourn, 'prod_id'=>$object->id);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action);
}
print_liste_field_titre('');
print "</tr>\n";
if (is_array($product_fourn_list))
{
foreach($product_fourn_list as $productfourn)
{
print '<tr class="oddeven">';
@ -924,7 +928,7 @@ SCRIPT;
if (is_object($hookmanager))
{
$parameters=array('id_pfp'=>$productfourn->product_fourn_price_id,'id_fourn'=>$id_fourn,'prod_id'=>$object->id);
$reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $object, $action);
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action);
}
// Modify-Remove

View File

@ -817,9 +817,11 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if ($facture->type == 2) { $remaindertopay=$langs->trans("RemainderToPayBack"); $multicurrencyremaindertopay=$langs->trans("MulticurrencyRemainderToPayBack"); }
$i = 0;
//print '<tr><td colspan="3">';
print '<br>';
print_barre_liste($langs->trans('StripeInvoiceList').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$arraytitle.'</td>';
@ -837,7 +839,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if (!empty($conf->multicurrency->enabled)) {
print '<td class="right">'.$langs->trans('MulticurrencyPaymentAmount').'</td>';
}
print '<td class="right">&nbsp;</td>';
$tmpinvoice =new Facture($db);
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $tmpinvoice, $action); // Note that $action and $object may have been modified by hook
print '<td align="right">&nbsp;</td>';
print "</tr>\n";
$total=0;
@ -967,6 +974,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print "</td>";
}
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
// Warning
print '<td class="center" width="16">';
//print "xx".$amounts[$invoice->id]."-".$amountsresttopay[$invoice->id]."<br>";
@ -977,9 +987,6 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
print '</td>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
print "</tr>\n";
$total+=$objp->total;
@ -991,7 +998,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
if ($i > 1)
{
$amount=round(price($sign * price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT'))*100);
$amount=round(price($sign * price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT'))*100);
// Print total
print '<tr class="liste_total">';
print '<td colspan="2" class="left">'.$langs->trans('TotalTTC').'</td>';
@ -1010,6 +1018,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if (!empty($conf->multicurrency->enabled)) {
print '<td class="right" id="multicurrency_result" style="font-weight: bold;"></td>';
}
print '<td></td>';
print "</tr>\n";
}
print "</table>";
@ -1106,22 +1115,29 @@ if (! GETPOST('action'))
print_liste_field_titre('Date', $_SERVER["PHP_SELF"], 'dp', '', '', '', $sortfield, $sortorder);
print_liste_field_titre('Type', $_SERVER["PHP_SELF"], 'libelle', '', '', '', $sortfield, $sortorder);
print_liste_field_titre('Amount', $_SERVER["PHP_SELF"], 'fa_amount', '', '', '', $sortfield, $sortorder, 'right ');
$tmpobject = new Paiement($db);
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $tmpobject, $action); // Note that $action and $object may have been modified by hook
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
print "</tr>\n";
print "</tr>\n";
while ($i < min($num, $limit))
{
$objp = $db->fetch_object($resql);
print '<tr class="oddeven">';
print '<td><a href="'.DOL_URL_ROOT.'compta/facture/card.php?facid='.$objp->facid.'">'.$objp->ref."</a></td>\n";
print '<td>'.dol_print_date($db->jdate($objp->dp))."</td>\n";
print '<td>'.$objp->paiement_type.' '.$objp->num_paiement."</td>\n";
print '<td class="right">'.price($objp->amount).'</td><td>&nbsp;</td>';
print '<td class="right">'.price($objp->amount).'</td>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
print '</tr>';
print '<td>&nbsp;</td>';
print '</tr>';
$i++;
}
print '</table>';