addtocash using sendcoins Circuit
This commit is contained in:
@@ -36,6 +36,7 @@ const MovementSchema = new Schema({
|
||||
accountToId: {
|
||||
type: String,
|
||||
},
|
||||
idOrdersCart: { type: Schema.Types.ObjectId, ref: 'OrdersCart' },
|
||||
causal_table: {
|
||||
type: String,
|
||||
},
|
||||
@@ -56,6 +57,10 @@ const MovementSchema = new Schema({
|
||||
expiringDate: {
|
||||
type: Date,
|
||||
},
|
||||
confirmed: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
MovementSchema.statics.findAllIdApp = async function (idapp) {
|
||||
@@ -90,7 +95,7 @@ MovementSchema.statics.executeQueryTable = function (idapp, params) {
|
||||
return tools.executeQueryTable(this, 0, params);
|
||||
};
|
||||
|
||||
MovementSchema.statics.addMov = async function (idapp, accountFromIdTable, accountToIdTable, amount, causal, notifId) {
|
||||
MovementSchema.statics.addMov = async function (idapp, accountFromIdTable, accountToIdTable, amount, causal, notifId, idOrdersCart) {
|
||||
|
||||
try {
|
||||
// Only positive values
|
||||
@@ -102,6 +107,7 @@ MovementSchema.statics.addMov = async function (idapp, accountFromIdTable, accou
|
||||
transactionDate: new Date(),
|
||||
accountFromId: accountFromIdTable._id,
|
||||
accountToId: accountToIdTable._id,
|
||||
idOrdersCart: idOrdersCart._id ?? null,
|
||||
amount,
|
||||
causal,
|
||||
residual: 0,
|
||||
|
||||
Reference in New Issue
Block a user