Misafir Kartı
Misafir Kartı Script
setTimeout(() => {
if(this.allFormControls['CARDNO'].value == null || this.allFormControls['CARDNO'].value == "" || this.allFormControls['CARDNO'].value == undefined){
this.recordService.component.api.execSP({
Object:'SP_POS_AUTOCARDNO',
Parameters:{
"CARDID":this.recordService.component.allFormControls.ID.value,
"HOTELID":this.recordService.component.api.tenant.HOTELID
}
}).subscribe(
resp=>{
this.allFormControls['CARDNO'].setValue(resp[0][0].CARDNO)
})
}
},500);
setTimeout(() => {
this.recordService.formGroup.controls.CARDNO.valueChanges.pipe(rxjs.debounceTime(2000)).subscribe(v => {
this.recordService.component.api.execSP({
Object:'SP_POS_AUTOCARDNO',
Parameters:{
"CARDID":this.recordService.component.allFormControls.ID.value,
"HOTELID":this.recordService.component.api.tenant.HOTELID
}
}).subscribe(
resp=>{
if(v < resp[0][0].CARDNO) {
let msg = `Previously Used!`;
msg = angus.languageService.staticTranslator.translate(msg);
this.angusDialog.alert(msg);
this.allFormControls['CARDNO'].setValue(resp[0][0].CARDNO)
}
})
});
},2000);
//16/07/2020*/
Last updated