Skip to content

Commit

Permalink
Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/adherents/class/adherent.class.php
	htdocs/fourn/facture/paiement.php
  • Loading branch information
eldy committed Mar 16, 2019
2 parents 01cd40d + 8adc333 commit dabccb7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
25 changes: 21 additions & 4 deletions htdocs/fourn/facture/paiement.php
Expand Up @@ -69,7 +69,7 @@
if (! $sortfield) $sortfield="p.rowid";
$optioncss = GETPOST('optioncss', 'alpha');

$amounts = array();array();
$amounts = array();
$amountsresttopay=array();
$addwarning=0;

Expand Down Expand Up @@ -249,6 +249,22 @@

$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();
Expand Down Expand Up @@ -432,6 +448,7 @@ function callForResult(imgId)
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);
Expand Down Expand Up @@ -620,14 +637,14 @@ function callForResult(imgId)
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">';
Expand Down
2 changes: 2 additions & 0 deletions htdocs/fourn/facture/rapport.php
Expand Up @@ -26,6 +26,8 @@
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;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/societe/card.php
Expand Up @@ -986,7 +986,7 @@
$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');
Expand Down

0 comments on commit dabccb7

Please sign in to comment.