refactor(Purchase): remove unused methods.
This commit is contained in:
		@@ -150,7 +150,6 @@
 | 
				
			|||||||
       valid: false,
 | 
					       valid: false,
 | 
				
			||||||
       client_search: '',
 | 
					       client_search: '',
 | 
				
			||||||
       product_search: '',
 | 
					       product_search: '',
 | 
				
			||||||
       payment_cash: 0,
 | 
					 | 
				
			||||||
       payment_methods: null,
 | 
					       payment_methods: null,
 | 
				
			||||||
       purchase: {
 | 
					       purchase: {
 | 
				
			||||||
         date: this.getCurrentDate(),
 | 
					         date: this.getCurrentDate(),
 | 
				
			||||||
@@ -186,23 +185,6 @@
 | 
				
			|||||||
         return total + this.calculateSubtotal(saleline);
 | 
					         return total + this.calculateSubtotal(saleline);
 | 
				
			||||||
       }, 0);
 | 
					       }, 0);
 | 
				
			||||||
     },
 | 
					     },
 | 
				
			||||||
     calculateChange() {
 | 
					 | 
				
			||||||
       if (this.purchase.payment_method === 'CASH') {
 | 
					 | 
				
			||||||
         return (this.payment_cash || 0) - this.calculateTotal;
 | 
					 | 
				
			||||||
       } else {
 | 
					 | 
				
			||||||
         return 0;
 | 
					 | 
				
			||||||
       }
 | 
					 | 
				
			||||||
     },
 | 
					 | 
				
			||||||
     isValidPayment() {
 | 
					 | 
				
			||||||
       if (this.calculateTotal === 0) {
 | 
					 | 
				
			||||||
         return false;
 | 
					 | 
				
			||||||
       }
 | 
					 | 
				
			||||||
       if (this.purchase.payment_method === 'CASH' && this.payment_cash < this.calculateTotal) {
 | 
					 | 
				
			||||||
         return false;
 | 
					 | 
				
			||||||
       }
 | 
					 | 
				
			||||||
       return true;
 | 
					 | 
				
			||||||
     },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     filteredClients() {
 | 
					     filteredClients() {
 | 
				
			||||||
       return this.clients.filter(client => {
 | 
					       return this.clients.filter(client => {
 | 
				
			||||||
         if (this.client_search === '') {
 | 
					         if (this.client_search === '') {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user