flexbiz-server 12.5.31 → 12.5.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -135,8 +135,8 @@ const view = async (user,self,rows,next,options)=> {
|
|
|
135
135
|
if(book=="sokho" && item.details?.length>0){
|
|
136
136
|
await item.details.asyncJoinModel2(item.id_app,"dmvt",{where:"ma_vt",fields:"tg_tk"});
|
|
137
137
|
fields.ma_vt =1;
|
|
138
|
-
let exists = await global.getModel(book).
|
|
139
|
-
if(exists){
|
|
138
|
+
let exists = await global.getModel(book).find({id_ct:item._id.toString()},fields).lean();
|
|
139
|
+
if(exists.length>0){
|
|
140
140
|
let ds_vt_voucher = item.details.filter(d=>d.tg_tk).map(d=>d.ma_vt).sort((a,b)=>a-b);
|
|
141
141
|
let ds_vt_book = exists.map(d=>d.ma_vt).sort((a,b)=>a-b);
|
|
142
142
|
|