mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 00:17:34 -05:00 
			
		
		
		
	Added option to enable/disable xml-attachments in the e-mail
This commit is contained in:
		
							parent
							
								
									bbd8403fe1
								
							
						
					
					
						commit
						510953630e
					
				@ -327,10 +327,12 @@ class EmailDefaults
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        /** E-Invoice xml file */
 | 
					        /** E-Invoice xml file */
 | 
				
			||||||
        if ($this->email->email_object->settings->enable_e_invoice) {
 | 
					        if ($this->email->email_object->settings->enable_e_invoice) {
 | 
				
			||||||
            $xml_string = $this->email->email_object->entity->service()->getEDocument();
 | 
					            if ($this->email_object->settings->e_invoice_attachment ?? true){
 | 
				
			||||||
 | 
					                $xml_string = $this->email->email_object->entity->service()->getEDocument();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if($xml_string) {
 | 
					                if($xml_string) {
 | 
				
			||||||
                $this->email->email_object->attachments = array_merge($this->email->email_object->attachments, [['file' => base64_encode($xml_string), 'name' => explode(".", $this->email->email_object->entity->getFileName('xml'))[0]."-e_invoice.xml"]]);
 | 
					                    $this->email->email_object->attachments = array_merge($this->email->email_object->attachments, [['file' => base64_encode($xml_string), 'name' => explode(".", $this->email->email_object->entity->getFileName('xml'))[0]."-e_invoice.xml"]]);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user