var path = require('path'); var database = require(path.join(__dirname, '../../database.js')); var format = require(path.join(__dirname, '../../util/format.js')); module.exports = class PaymentUpdate { getData(params, cb) { let query = `SELECT pm.name AS payMethod, pm.id AS payMethodId, c.vencimiento AS payDay, c.CC AS accountAddress FROM Clientes AS c JOIN pay_met AS pm ON pm.id = c.pay_met_id WHERE Id_Cliente = ?`; database.pool.query(query, [params.userId], (error, result) => { Object.assign(this, result[0]); cb(); }); } get paymentDay() { if (this.payMethodId != 5) { return `