mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:07:32 -05:00 
			
		
		
		
	Prevent emailing recurring invoice through API
This commit is contained in:
		
							parent
							
								
									fbf5e726fb
								
							
						
					
					
						commit
						905593b525
					
				@ -176,7 +176,7 @@ class InvoiceApiController extends BaseAPIController
 | 
				
			|||||||
        if (isset($data['email_invoice']) && $data['email_invoice']) {
 | 
					        if (isset($data['email_invoice']) && $data['email_invoice']) {
 | 
				
			||||||
            if ($payment) {
 | 
					            if ($payment) {
 | 
				
			||||||
                $this->mailer->sendPaymentConfirmation($payment);
 | 
					                $this->mailer->sendPaymentConfirmation($payment);
 | 
				
			||||||
            } else {
 | 
					            } elseif ( ! $invoice->is_recurring) {
 | 
				
			||||||
                $this->mailer->sendInvoice($invoice);
 | 
					                $this->mailer->sendInvoice($invoice);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user