[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r360 - tag/rel605/import_doli/include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r360 - tag/rel605/import_doli/include |
Date: |
Fri, 25 May 2012 19:32:49 +0200 (CEST) |
Author: danydb
Date: 2012-05-25 19:32:48 +0200 (Fri, 25 May 2012)
New Revision: 360
Modified:
tag/rel605/import_doli/include/class_impdol_operation.php
Log:
bug : substr doesn't cut properly unicode string
Modified: tag/rel605/import_doli/include/class_impdol_operation.php
===================================================================
--- tag/rel605/import_doli/include/class_impdol_operation.php 2012-04-24
17:34:02 UTC (rev 359)
+++ tag/rel605/import_doli/include/class_impdol_operation.php 2012-05-25
17:32:48 UTC (rev 360)
@@ -341,7 +341,7 @@
$jrnx->user = $_SESSION['g_user'];
$jrnx->periode = 0;
$jrnx->qcode = $oper->getp("qcode");
- $jrnx->desc =
substr($oper->getp("desc"),0,80);
+ $jrnx->desc =
mb_substr($oper->getp("desc"),0,80,'UTF8');
$id = $jrnx->insert_jrnx();
$transfer = new
impdol_operation_transfer_sql();
@@ -402,7 +402,7 @@
$jtiers->user = $_SESSION['g_user'];
$jtiers->periode = 0;
$jtiers->qcode = $oper_tiers->getp("qcode");
- $jtiers->desc =
substr($oper_tiers->getp("desc"),0,80);
+ $jtiers->desc =
mb_substr($oper_tiers->getp("desc"),0,80,'UTF8');
$jtiers->insert_jrnx();
/* Record the vat 1 */
@@ -429,7 +429,7 @@
$acc_jrn = new Acc_Operation($cn);
$acc_jrn->jrn = $jrn;
$acc_jrn->amount = $sum;
- $acc_jrn->desc =
substr($oper_tiers->getp("desc"),0,80);
+ $acc_jrn->desc =
mb_substr($oper_tiers->getp("desc"),0,80,'UTF8');
$acc_jrn->date = $date;
$acc_jrn->grpt = $grpt;
$acc_jrn->periode = 0;
@@ -456,7 +456,7 @@
catch (Exception $e)
{
print_r($e->getTraceAsString());
- $cn->rollback;
+ $cn->rollback();
}
}
---
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] r360 - tag/rel605/import_doli/include,
phpcompta-dev <=