File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -65,13 +65,18 @@ export class GuestEntryComponent implements OnInit {
6565 }
6666 }
6767
68- cleanData ( history :any ) {
69- let body = [ ] ;
70- for ( let i = 0 ; i < 3 ; i ++ ) {
71- if ( Object . keys ( history [ i ] [ "data" ] ) . length ) {
72- for ( let key in history [ i ] [ "data" ] ) {
73- let booking = [ ] ;
74- let withdrawable = this . guestService . withdrawValidity ( key , i ) ;
68+ cleanData ( history : any ) {
69+ let body = [ ] ;
70+ for ( let i = 0 ; i < 3 ; i ++ ) {
71+ if ( Object . keys ( history [ i ] [ "data" ] ) . length ) {
72+ for ( let key in history [ i ] [ "data" ] ) {
73+ if ( history [ i ] [ "data" ] [ key ] [ "payment_status" ] === 'paid' ||
74+ history [ i ] [ "data" ] [ key ] [ "payment_status" ] === 'no_show' ) {
75+ continue ;
76+ }
77+
78+ let booking = [ ] ;
79+ let withdrawable = this . guestService . withdrawValidity ( key , i ) ;
7580 booking . push ( history [ i ] [ "data" ] [ key ] [ "index" ] )
7681 booking . push ( history [ i ] [ "data" ] [ key ] [ "guesthostel" ] )
7782 booking . push ( this . legel_date [ i ] )
You can’t perform that action at this time.
0 commit comments