Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/adherents/class/adherent.class.php htdocs/fourn/facture/paiement.php
This commit is contained in:
commit
dabccb7967
@ -69,7 +69,7 @@ if (! $sortorder) $sortorder="DESC";
|
||||
if (! $sortfield) $sortfield="p.rowid";
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
|
||||
$amounts = array();array();
|
||||
$amounts = array();
|
||||
$amountsresttopay=array();
|
||||
$addwarning=0;
|
||||
|
||||
@ -249,6 +249,22 @@ if (empty($reshook))
|
||||
|
||||
$datepaye = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
||||
|
||||
// Clean parameters amount if payment is for a credit note
|
||||
if (GETPOST('type') == FactureFournisseur::TYPE_CREDIT_NOTE)
|
||||
{
|
||||
foreach ($amounts as $key => $value) // How payment is dispatch
|
||||
{
|
||||
$newvalue = price2num($value,'MT');
|
||||
$amounts[$key] = -$newvalue;
|
||||
}
|
||||
|
||||
foreach ($multicurrency_amounts as $key => $value) // How payment is dispatch
|
||||
{
|
||||
$newvalue = price2num($value,'MT');
|
||||
$multicurrency_amounts[$key] = -$newvalue;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$db->begin();
|
||||
@ -432,6 +448,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '<input type="hidden" name="facid" value="'.$facid.'">';
|
||||
print '<input type="hidden" name="ref_supplier" value="'.$obj->ref_supplier.'">';
|
||||
print '<input type="hidden" name="socid" value="'.$obj->socid.'">';
|
||||
print '<input type="hidden" name="type" id="invoice_type" value="'.$object->type.'">';
|
||||
print '<input type="hidden" name="societe" value="'.$obj->name.'">';
|
||||
|
||||
dol_fiche_head(null);
|
||||
@ -620,14 +637,14 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
print '<td class="right">'.price($objp->total_ttc).'</td>';
|
||||
print '<td class="right">'.price($sign * $objp->total_ttc).'</td>';
|
||||
|
||||
print '<td class="right">'.price($objp->am);
|
||||
print '<td class="right">'.price($sign * $objp->am);
|
||||
if ($creditnotes) print '+'.price($creditnotes);
|
||||
if ($deposits) print '+'.price($deposits);
|
||||
print '</td>';
|
||||
|
||||
print '<td class="right">'.price($remaintopay).'</td>';
|
||||
print '<td class="right">'.price($sign * $remaintopay).'</td>';
|
||||
|
||||
// Amount
|
||||
print '<td class="center">';
|
||||
|
||||
@ -26,6 +26,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/rapport/pdf_paiement_fourn.class.p
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
|
||||
$langs->loadLangs(array('bills'));
|
||||
|
||||
// Security check
|
||||
$socid='';
|
||||
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
||||
|
||||
@ -986,7 +986,7 @@ else
|
||||
$object->idprof6 = GETPOST('idprof6', 'alpha');
|
||||
$object->typent_id = GETPOST('typent_id', 'int');
|
||||
$object->effectif_id = GETPOST('effectif_id', 'int');
|
||||
$object->civility_id = GETPOST('civility_id', 'int');
|
||||
$object->civility_id = GETPOST('civility_id', 'alpha');
|
||||
|
||||
$object->tva_assuj = GETPOST('assujtva_value', 'int');
|
||||
$object->status = GETPOST('status', 'int');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user