const system = require("../../../system");
const ServiceBase = require("../../svems.base")
const settings = require("../../../../config/settings")
class InvoiceService extends ServiceBase {
    constructor() {
        super();
    }

    async saasinvoicePage(params){
        var rs = await this.callms("invoice", "saasinvoicePage", params);
        if (rs && rs.data && rs.data.rows) {
            this.transOrderField(rs.data.rows);
        }
        return rs;
    }

    transOrderField(rows) {
        if (!rows || rows.length == 0) {
            return;
        }

        for (let row of rows) {
            row.price = system.f2y(row.price);
        }
    }

}
module.exports = InvoiceService;
