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 $reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if(empty($reshook)){ if(empty($reshook)){
print $hookmanager->resPrint; print $hookmanager->resPrint;
$solde = isset($hookmanager->resArray['solde']) ? $hookmanager->resArray['solde'] : $solde; $solde = isset($hookmanager->resArray['solde']) ? $hookmanager->resArray['solde'] : $solde;
} }
// solde // solde

View File

@ -744,6 +744,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
} }
print "</td>"; print "</td>";
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
// Warning // Warning
print '<td align="center" width="16">'; print '<td align="center" width="16">';
//print "xx".$amounts[$invoice->id]."-".$amountsresttopay[$invoice->id]."<br>"; //print "xx".$amounts[$invoice->id]."-".$amountsresttopay[$invoice->id]."<br>";
@ -754,9 +757,6 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
} }
print '</td>'; 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"; print "</tr>\n";
$total+=$objp->total; $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><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>'.dol_print_date($db->jdate($objp->dp))."</td>\n";
print '<td>'.$objp->paiement_type.' '.$objp->num_paiement."</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>';
print '<td>&nbsp;</td>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
print '</tr>'; print '</tr>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
$i++; $i++;
} }
print '</table>'; print '</table>';

View File

@ -172,7 +172,8 @@ function societe_prepare_head(Societe $object)
} }
// Related items // 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][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Referers"); $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("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 '); 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_liste_field_titre('');
print "</tr>\n"; print "</tr>\n";
if (is_array($product_fourn_list)) if (is_array($product_fourn_list))
{ {
foreach($product_fourn_list as $productfourn) foreach($product_fourn_list as $productfourn)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
@ -924,7 +928,7 @@ SCRIPT;
if (is_object($hookmanager)) if (is_object($hookmanager))
{ {
$parameters=array('id_pfp'=>$productfourn->product_fourn_price_id,'id_fourn'=>$id_fourn,'prod_id'=>$object->id); $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 // 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"); } if ($facture->type == 2) { $remaindertopay=$langs->trans("RemainderToPayBack"); $multicurrencyremaindertopay=$langs->trans("MulticurrencyRemainderToPayBack"); }
$i = 0; $i = 0;
//print '<tr><td colspan="3">';
print '<br>'; print '<br>';
print_barre_liste($langs->trans('StripeInvoiceList').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', ''); print_barre_liste($langs->trans('StripeInvoiceList').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$arraytitle.'</td>'; print '<td>'.$arraytitle.'</td>';
@ -837,7 +839,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if (!empty($conf->multicurrency->enabled)) { if (!empty($conf->multicurrency->enabled)) {
print '<td class="right">'.$langs->trans('MulticurrencyPaymentAmount').'</td>'; 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"; print "</tr>\n";
$total=0; $total=0;
@ -967,6 +974,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print "</td>"; print "</td>";
} }
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
// Warning // Warning
print '<td class="center" width="16">'; print '<td class="center" width="16">';
//print "xx".$amounts[$invoice->id]."-".$amountsresttopay[$invoice->id]."<br>"; //print "xx".$amounts[$invoice->id]."-".$amountsresttopay[$invoice->id]."<br>";
@ -977,9 +987,6 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
} }
print '</td>'; 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"; print "</tr>\n";
$total+=$objp->total; $total+=$objp->total;
@ -991,7 +998,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
} }
if ($i > 1) 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 total
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td colspan="2" class="left">'.$langs->trans('TotalTTC').'</td>'; 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)) { if (!empty($conf->multicurrency->enabled)) {
print '<td class="right" id="multicurrency_result" style="font-weight: bold;"></td>'; print '<td class="right" id="multicurrency_result" style="font-weight: bold;"></td>';
} }
print '<td></td>';
print "</tr>\n"; print "</tr>\n";
} }
print "</table>"; print "</table>";
@ -1106,22 +1115,29 @@ if (! GETPOST('action'))
print_liste_field_titre('Date', $_SERVER["PHP_SELF"], 'dp', '', '', '', $sortfield, $sortorder); 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('Type', $_SERVER["PHP_SELF"], 'libelle', '', '', '', $sortfield, $sortorder);
print_liste_field_titre('Amount', $_SERVER["PHP_SELF"], 'fa_amount', '', '', '', $sortfield, $sortorder, 'right '); 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_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
print "</tr>\n"; print "</tr>\n";
while ($i < min($num, $limit)) while ($i < min($num, $limit))
{ {
$objp = $db->fetch_object($resql); $objp = $db->fetch_object($resql);
print '<tr class="oddeven">'; 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><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>'.dol_print_date($db->jdate($objp->dp))."</td>\n";
print '<td>'.$objp->paiement_type.' '.$objp->num_paiement."</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(); $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++; $i++;
} }
print '</table>'; print '</table>';