Skip to content

Commit

Permalink
enhancement: multi currency support - adjusted message add module (LMS+
Browse files Browse the repository at this point in the history
  • Loading branch information
chilek committed Oct 31, 2019
1 parent 47bf99e commit 5dc0149
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions bin/lms-notify.php
Expand Up @@ -373,15 +373,15 @@ function parse_customer_data($data, $row)
$lN = '';
} else {
// ok, now we are going to rise up system's load
$lN = '-----------+---------------+---------------+----------------------------------------------------<eol>';
$lN = '-----------+--------------+---------------+----------------------------------------------------<eol>';
foreach ($lastN as $row_s) {
$op_time = strftime("%Y/%m/%d", $row_s['time']);
$op_amount = sprintf("%9.2f %s", $row_s['value'], $row_s['currency']);
$op_after = sprintf("%9.2f %s", $row_s['after'], LMS::$currency);
$op_time = strftime("%Y/%m/%d ", $row_s['time']);
$op_amount = sprintf("%9.2f %s ", $row_s['value'], $row_s['currency']);
$op_after = sprintf("%9.2f %s ", $row_s['after'], LMS::$currency);
$for_what = sprintf("%-52s", $row_s['comment']);
$lN .= $op_time . '|' . $op_amount . '|' . $op_after . '|' . $for_what . '<eol>';
}
$lN .= '-----------+---------------+---------------+----------------------------------------------------<eol>';
$lN .= '-----------+--------------+---------------+----------------------------------------------------<eol>';
}
$data = preg_replace('/%last_[0-9]+_in_a_table/', $lN, $data);
}
Expand Down
10 changes: 5 additions & 5 deletions lib/LMS.class.php
Expand Up @@ -4210,15 +4210,15 @@ public function SendInvoices($docs, $type, $params)
$lN = '';
} else {
// ok, now we are going to rise up system's load
$lN = "-----------+---------------+---------------+----------------------------------------------------<eol>";
$lN = "-----------+--------------+---------------+----------------------------------------------------<eol>";
foreach ($lastN as $row_s) {
$op_time = strftime("%Y/%m/%d", $row_s['time']);
$op_amount = sprintf("%9.2f %s", $row_s['value'], $row_s['currency']);
$op_after = sprintf("%9.2f %s", $row_s['after'], LMS::$currency);
$op_time = strftime("%Y/%m/%d ", $row_s['time']);
$op_amount = sprintf("%9.2f %s ", $row_s['value'], $row_s['currency']);
$op_after = sprintf("%9.2f %s ", $row_s['after'], LMS::$currency);
$for_what = sprintf("%-52s", $row_s['comment']);
$lN = $lN . "$op_time | $op_amount | $op_after | $for_what<eol>";
}
$lN = $lN . "-----------+---------------+---------------+----------------------------------------------------<eol>";
$lN = $lN . "-----------+--------------+---------------+----------------------------------------------------<eol>";
}
$body = preg_replace('/%last_[0-9]+_in_a_table/', $lN, $body);
}
Expand Down
10 changes: 5 additions & 5 deletions modules/messageadd.php
Expand Up @@ -261,15 +261,15 @@ function BodyVars(&$body, $data, $eol)
$lN = '';
} else {
// ok, now we are going to rise up system's load
$lN = '-----------+---------------+---------------+----------------------------------------------------' . $eol;
$lN = '-----------+--------------+---------------+----------------------------------------------------' . $eol;
foreach ($lastN as $row_s) {
$op_time = strftime("%Y/%m/%d", $row_s['time']);
$op_amount = sprintf("%9.2f %s", $row_s['value'], $row_s['currency']);
$op_after = sprintf("%9.2f %s", $row_s['after'], LMS::$currency);
$op_time = strftime("%Y/%m/%d ", $row_s['time']);
$op_amount = sprintf("%9.2f %s ", $row_s['value'], $row_s['currency']);
$op_after = sprintf("%9.2f %s ", $row_s['after'], LMS::$currency);
$for_what = sprintf("%-52s", $row_s['comment']);
$lN .= $op_time . '|' . $op_amount . '|' . $op_after . '|' . $for_what . $eol;
}
$lN .= '-----------+---------------+---------------+----------------------------------------------------' . $eol;
$lN .= '-----------+--------------+---------------+----------------------------------------------------' . $eol;
}
$body = preg_replace('/%last_[0-9]+_in_a_table/', $lN, $body);
}
Expand Down

0 comments on commit 5dc0149

Please sign in to comment.