Skip to content

Commit

Permalink
Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Dec 23, 2016
2 parents 8ce5ed0 + 99a501f commit a9beeec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion htdocs/accountancy/class/accountancyexport.class.php
Expand Up @@ -357,7 +357,7 @@ public function exportQuadratus(&$TData) {
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_compte, 20), 20);
$Tab['sens'] = $data->sens; // C or D
$Tab['signe_montant'] = '+';
$Tab['montant'] = str_pad(abs($data->montant) * 100, 12, '0', STR_PAD_LEFT); // TODO manage negative amount
$Tab['montant'] = str_pad(abs($data->montant), 12, '0', STR_PAD_LEFT); // TODO manage negative amount
$Tab['contrepartie'] = str_repeat(' ', 8);
if (! empty($data->date_echeance))
$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
Expand Down
14 changes: 9 additions & 5 deletions htdocs/compta/facture/list.php
Expand Up @@ -1216,16 +1216,20 @@
$facturestatic->type=$obj->type;
$facturestatic->statut=$obj->fk_statut;
$facturestatic->date_lim_reglement=$db->jdate($obj->datelimite);

$paiement = $facturestatic->getSommePaiement();
$totalcreditnotes = $facturestatic->getSumCreditNotesUsed();
$totaldeposits = $facturestatic->getSumDepositsUsed();
$totalpay = $paiement + $totalcreditnotes + $totaldeposits;
$remaintopay = $obj->total_ttc - $totalpay;

print '<tr '.$bc[$var].'>';
if (! empty($arrayfields['f.facnumber']['checked']))
{
print '<td class="nowrap">';

$notetoshow=dol_string_nohtmltag(($user->societe_id>0?$obj->note_public:$obj->note_private),1);
$paiement = $facturestatic->getSommePaiement();
$remaintopay = $obj->total_ttc - $paiement;


print '<table class="nobordernopadding"><tr class="nocellnopadd">';

print '<td class="nobordernopadding nowrap">';
Expand Down Expand Up @@ -1372,10 +1376,10 @@

if (! empty($arrayfields['dynamount_payed']['checked']))
{
print '<td align="right">'.(! empty($paiement)?price($paiement,0,$langs):'&nbsp;').'</td>'; // TODO Use a denormalized field
print '<td align="right">'.(! empty($totalpay)?price($totalpay,0,$langs):'&nbsp;').'</td>'; // TODO Use a denormalized field
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalamfield']=$totalarray['nbfield'];
$totalarray['totalam'] += $paiement;
$totalarray['totalam'] += $totalpay;
}

if (! empty($arrayfields['rtp']['checked']))
Expand Down

0 comments on commit a9beeec

Please sign in to comment.