[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r466 - trunk/import_account/include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r466 - trunk/import_account/include |
Date: |
Tue, 5 Mar 2013 16:38:23 +0100 (CET) |
Author: danydb
Date: 2013-03-05 16:38:23 +0100 (Tue, 05 Mar 2013)
New Revision: 466
Modified:
trunk/import_account/include/class_impacc_operation.php
Log:
0000782: Nouveau module import_account - impossible d'importer un avoir (
montant n?\195?\169gatif )
Modified: trunk/import_account/include/class_impacc_operation.php
===================================================================
--- trunk/import_account/include/class_impacc_operation.php 2013-02-28
13:47:50 UTC (rev 465)
+++ trunk/import_account/include/class_impacc_operation.php 2013-03-05
15:38:23 UTC (rev 466)
@@ -334,6 +334,7 @@
$amount_tva = $oper->getp("amount_vat");
$amount_tvac =
$oper->getp("amount_total");
$jrnx->amount = bcsub($amount_tvac,
$amount_tva);
+ $save_amount=$jrnx->amount;
$jrnx->poste = $oper->getp('poste');
$jrnx->grpt = $grpt;
$jrnx->type = $oth_side;
@@ -359,7 +360,7 @@
case 'ACH':
$sql = "insert into
quant_purchase(qp_internal,j_id,qp_fiche,qp_quantite,qp_price,qp_vat,qp_vat_code,qp_supplier)
values($1,$2,$3,$4,$5,$6,$7,$8)";
- $cn->exec_sql($sql,
array(null, $id, $oper->getp("fiche"), $oper->getp("number_unit"),
$jrnx->amount, $amount_tva, $tva_id, $oper_tiers->getp("fiche")));
+ $cn->exec_sql($sql,
array(null, $id, $oper->getp("fiche"), $oper->getp("number_unit"),
$save_amount, $amount_tva, $tva_id, $oper_tiers->getp("fiche")));
break;
case 'VEN':
$cn->exec_sql("insert
into quant_sold
@@ -368,7 +369,7 @@
($1,$2,$3,$4,$5,$6,$7,$8,$9,$10)",
array(null, /* 1 qs_internal */
$oper->getp("fiche"), /* 2 qs_fiche */
$oper->getp("number_unit"), /* 3 qs_quantite */
- $jrnx->amount,
/* 4 qs_price */
+ $save_amount,
/* 4 qs_price */
$amount_tva, /*
5 qs_vat */
$tva_id, /* 6
qs_vat_code */
$oper_tiers->getp('fiche'), /* 7 qs_client */
@@ -394,7 +395,7 @@
$jtiers = new Acc_Operation($cn);
$jtiers->date = $date;
- $jtiers->amount = $sum;
+ $jtiers->amount = abs($sum);
$jtiers->poste = $oper_tiers->getp('poste');
$jtiers->grpt = $grpt;
$jtiers->type = $tiers_side;
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r466 - trunk/import_account/include,
phpcompta-dev <=