mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 01:47:32 -05:00 
			
		
		
		
	Minor fixes
This commit is contained in:
		
							parent
							
								
									1fbbaaad4d
								
							
						
					
					
						commit
						fb7f44615d
					
				@ -53,6 +53,9 @@ class InvoiceSum
 | 
			
		||||
    {
 | 
			
		||||
        $this->invoice = $invoice;
 | 
			
		||||
 | 
			
		||||
        // if(!$this->invoice->relationLoaded('client'))
 | 
			
		||||
        //     $this->invoice->load('client');
 | 
			
		||||
 | 
			
		||||
        $this->tax_map = new Collection;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -49,6 +49,7 @@ class EntityCreatedObject
 | 
			
		||||
        /* Set customized translations _NOW_ */
 | 
			
		||||
        $t->replace(Ninja::transformTranslations($this->entity->company->settings));
 | 
			
		||||
 | 
			
		||||
        $this->entity->load('client.country', 'client.company');
 | 
			
		||||
        $this->client = $this->entity->client;
 | 
			
		||||
        $this->company = $this->entity->company;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -87,7 +87,7 @@ class TemplateEmail extends Mailable
 | 
			
		||||
        $this->from(config('mail.from.address'), $email_from_name);
 | 
			
		||||
 | 
			
		||||
        if (strlen($settings->bcc_email) > 1)
 | 
			
		||||
            $this->bcc(explode(",",$settings->bcc_email));
 | 
			
		||||
            $this->bcc(explode(",",str_replace(" ", "", $settings->bcc_email)));//remove whitespace if any has been inserted.
 | 
			
		||||
 | 
			
		||||
        $this->subject($this->build_email->getSubject())
 | 
			
		||||
            ->text('email.template.plain', [
 | 
			
		||||
 | 
			
		||||
@ -81,7 +81,8 @@ class ActivityRepository extends BaseRepository
 | 
			
		||||
            || get_class($entity) == Credit::class 
 | 
			
		||||
            || get_class($entity) == RecurringInvoice::class
 | 
			
		||||
        ) {
 | 
			
		||||
            $entity->load('company', 'client');
 | 
			
		||||
            
 | 
			
		||||
            $entity->load('client');
 | 
			
		||||
            $contact = $entity->client->primary_contact()->first();
 | 
			
		||||
            $backup->html_backup = $this->generateHtml($entity);
 | 
			
		||||
            $backup->amount = $entity->amount;
 | 
			
		||||
@ -95,7 +96,7 @@ class ActivityRepository extends BaseRepository
 | 
			
		||||
    public function getTokenId(array $event_vars)
 | 
			
		||||
    {
 | 
			
		||||
        if ($event_vars['token']) {
 | 
			
		||||
            $company_token = CompanyToken::whereRaw('BINARY `token`= ?', [$event_vars['token']])->first();
 | 
			
		||||
            $company_token = CompanyToken::where('token', $event_vars['token'])->first();
 | 
			
		||||
 | 
			
		||||
            if ($company_token) {
 | 
			
		||||
                return $company_token->id;
 | 
			
		||||
@ -117,7 +118,7 @@ class ActivityRepository extends BaseRepository
 | 
			
		||||
            $entity_design_id = 'credit_design_id';
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $entity->load('client','client.company');
 | 
			
		||||
        // $entity->load('client.company');
 | 
			
		||||
 | 
			
		||||
        $entity_design_id = $entity->design_id ? $entity->design_id : $this->decodePrimaryKey($entity->client->getSetting($entity_design_id));
 | 
			
		||||
 | 
			
		||||
@ -128,6 +129,8 @@ class ActivityRepository extends BaseRepository
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $entity->load('client.company', 'invitations');
 | 
			
		||||
 | 
			
		||||
        $html = new HtmlEngine($entity->invitations->first());
 | 
			
		||||
 | 
			
		||||
        if ($design->is_custom) {
 | 
			
		||||
 | 
			
		||||
@ -64,7 +64,6 @@ class TriggeredActions extends AbstractService
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        $reminder_template = $this->invoice->calculateTemplate('invoice');
 | 
			
		||||
        //$reminder_template = 'payment';
 | 
			
		||||
 | 
			
		||||
        $this->invoice->invitations->load('contact.client.country', 'invoice.client.country', 'invoice.company')->each(function ($invitation) use ($reminder_template) {
 | 
			
		||||
            EmailEntity::dispatch($invitation, $this->invoice->company, $reminder_template);
 | 
			
		||||
 | 
			
		||||
@ -49,7 +49,6 @@ class HtmlEngine
 | 
			
		||||
    public function __construct($invitation)
 | 
			
		||||
    {
 | 
			
		||||
        $this->invitation = $invitation;
 | 
			
		||||
        // $invitation->load('contact.client.company', 'company');
 | 
			
		||||
 | 
			
		||||
        $this->entity_string = $this->resolveEntityString();
 | 
			
		||||
 | 
			
		||||
@ -59,8 +58,8 @@ class HtmlEngine
 | 
			
		||||
 | 
			
		||||
        $this->contact = $invitation->contact;
 | 
			
		||||
        
 | 
			
		||||
        $this->client = $invitation->contact->client;
 | 
			
		||||
        $this->client->load('country','company');
 | 
			
		||||
        $this->client = $this->contact->client->load('company','country');
 | 
			
		||||
        
 | 
			
		||||
        $this->entity->load('client');
 | 
			
		||||
 | 
			
		||||
        $this->settings = $this->client->getMergedSettings();
 | 
			
		||||
 | 
			
		||||
@ -2479,6 +2479,8 @@ $LANG = array(
 | 
			
		||||
    'currency_cambodian_riel' => 'Cambodian Riel',
 | 
			
		||||
    'currency_vanuatu_vatu' => 'Vanuatu Vatu',
 | 
			
		||||
 | 
			
		||||
    'currency_cuban_peso' => 'Cuban Peso',
 | 
			
		||||
 | 
			
		||||
    'review_app_help' => 'We hope you\'re enjoying using the app.<br/>If you\'d consider :link we\'d greatly appreciate it!',
 | 
			
		||||
    'writing_a_review' => 'writing a review',
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user