66 public function cleanAmount(&$arrayrecord, $listfields, $record_key)
68 $value_trim = trim($arrayrecord[$record_key][
'val']);
69 return floatval($value_trim);
80 public function cleanValue(&$arrayrecord, $listfields, $record_key)
82 return trim($arrayrecord[$record_key][
'val']);
96 if (isset($listfields[
'b.debit']) && isset($listfields[
'b.credit'])) {
97 $debit_index = $listfields[
'b.debit'];
98 $credit_index = $listfields[
'b.credit'];
100 $debit = floatval($arrayrecord[$debit_index][
'val']);
101 $credit = floatval($arrayrecord[$credit_index][
'val']);
102 if (!empty($debit)) {
108 return "'" . $this->db->escape(abs($amount)) .
"'";
125 if (isset($listfields[
'b.debit'])) {
126 $debit_index = $listfields[
'b.debit'];
128 $debit = floatval($arrayrecord[$debit_index][
'val']);
129 if (!empty($debit)) {
135 return "'" . $this->db->escape($sens) .
"'";
Manage the different format accountancy import.
computeAmount(&$arrayrecord, $listfields, $record_key)
Compute amount.
cleanAmount(&$arrayrecord, $listfields, $record_key)
Clean amount.
cleanValue(&$arrayrecord, $listfields, $record_key)
Clean value with trim.
computeDirection(&$arrayrecord, $listfields, $record_key)
Compute direction.
__construct(DoliDB $db)
Constructor.
Class to manage Dolibarr database access.