changes
This commit is contained in:
@@ -221,8 +221,8 @@ const {
|
||||
$stripHtml,
|
||||
$snackbar,
|
||||
$dayjs,
|
||||
$formatNumber,
|
||||
$numtoString,
|
||||
$parseNum,
|
||||
$formatNum,
|
||||
$empty,
|
||||
$unique,
|
||||
$multiSort,
|
||||
@@ -523,9 +523,9 @@ const formatCellValue = (value, field) => {
|
||||
if (value === undefined || value === null || value === "") return "-";
|
||||
|
||||
if (field.format === "number") {
|
||||
const num = $formatNumber(value);
|
||||
const num = $parseNum(value);
|
||||
if (num === undefined) return "-";
|
||||
return $numtoString(num, "vi-VN", field.decimal || 0, field.decimal || 0);
|
||||
return $formatNum(num, "vi-VN", field.decimal || 0, field.decimal || 0);
|
||||
}
|
||||
|
||||
if (field.format === "date") {
|
||||
@@ -596,8 +596,8 @@ const getDataCellStyle = (row, leaf) => {
|
||||
|
||||
if (cell && leaf.field) {
|
||||
if (leaf.field === "paid_amount") {
|
||||
const amount = $formatNumber(cell.amount) || 0;
|
||||
const paid = $formatNumber(cell.paid_amount) || 0;
|
||||
const amount = $parseNum(cell.amount) || 0;
|
||||
const paid = $parseNum(cell.paid_amount) || 0;
|
||||
if (paid >= amount) {
|
||||
style += " background-color: #d4edda;";
|
||||
} else if (paid > 0) {
|
||||
@@ -608,8 +608,8 @@ const getDataCellStyle = (row, leaf) => {
|
||||
}
|
||||
if (leaf.field === "to_date") {
|
||||
const dueDate = cell.to_date;
|
||||
const paid = $formatNumber(cell.paid_amount) || 0;
|
||||
const amount = $formatNumber(cell.amount) || 0;
|
||||
const paid = $parseNum(cell.paid_amount) || 0;
|
||||
const amount = $parseNum(cell.amount) || 0;
|
||||
if (dueDate && paid < amount) {
|
||||
const today = new Date();
|
||||
const due = new Date(dueDate);
|
||||
|
||||
Reference in New Issue
Block a user