mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-01 20:17:35 -04:00 
			
		
		
		
	Merge pull request #6490 from turbo124/v5-develop
Minor fixes for namespaces
This commit is contained in:
		
						commit
						59c9287ec5
					
				| @ -28,6 +28,7 @@ class SubdomainController extends BaseController | ||||
|         'custom_domain', | ||||
|         'preview', | ||||
|         'invoiceninja', | ||||
|         'cname', | ||||
|     ]; | ||||
| 
 | ||||
|     public function __construct() | ||||
|  | ||||
| @ -107,6 +107,7 @@ class StoreRecurringInvoiceRequest extends Request | ||||
|         } else { | ||||
|             if ($client = Client::find($input['client_id'])) { | ||||
|                 $input['auto_bill'] = $client->getSetting('auto_bill'); | ||||
|                 $input['auto_bill_enabled'] = $this->setAutoBillFlag($input['auto_bill']); | ||||
|             } | ||||
|         } | ||||
|      | ||||
| @ -115,14 +116,12 @@ class StoreRecurringInvoiceRequest extends Request | ||||
| 
 | ||||
|     private function setAutoBillFlag($auto_bill) | ||||
|     { | ||||
|         if ($auto_bill == 'always') { | ||||
|         if ($auto_bill == 'always' || $auto_bill == 'optout') { | ||||
|             return true; | ||||
|         } | ||||
|          | ||||
| 
 | ||||
|         //if ($auto_bill == 'off' || $auto_bill == 'optin') {
 | ||||
|         return false; | ||||
|         //}
 | ||||
|          | ||||
|     } | ||||
| 
 | ||||
|     public function messages() | ||||
|  | ||||
| @ -25,6 +25,7 @@ use Illuminate\Foundation\Bus\Dispatchable; | ||||
| use Illuminate\Queue\InteractsWithQueue; | ||||
| use Illuminate\Queue\SerializesModels; | ||||
| use Illuminate\Support\Carbon; | ||||
| use Illuminate\Support\Facades\App; | ||||
| 
 | ||||
| class ReminderJob implements ShouldQueue | ||||
| { | ||||
| @ -148,6 +149,10 @@ class ReminderJob implements ShouldQueue | ||||
|      */ | ||||
|     private function setLateFee($invoice, $amount, $percent) :Invoice | ||||
|     { | ||||
|         App::forgetInstance('translator'); | ||||
|         $t = app('translator'); | ||||
|         $t->replace(Ninja::transformTranslations($invoice->client->getMergedSettings())); | ||||
| 
 | ||||
|         $temp_invoice_balance = $invoice->balance; | ||||
| 
 | ||||
|         if ($amount <= 0 && $percent <= 0) { | ||||
|  | ||||
| @ -94,6 +94,7 @@ class Company extends BaseModel | ||||
|         'invoice_task_datelog', | ||||
|         'default_password_timeout', | ||||
|         'show_task_end_date', | ||||
|         'use_comma_as_decimal_place', | ||||
|     ]; | ||||
| 
 | ||||
|     protected $hidden = [ | ||||
|  | ||||
| @ -10,7 +10,7 @@ | ||||
|  * @license https://www.elastic.co/licensing/elastic-license | ||||
|  */ | ||||
| 
 | ||||
| namespace App\PaymentDrivers\Eway; | ||||
| namespace App\PaymentDrivers\Sample; | ||||
| 
 | ||||
| use App\Exceptions\PaymentFailed; | ||||
| use App\Jobs\Mail\PaymentFailureMailer; | ||||
|  | ||||
| @ -9,7 +9,7 @@ | ||||
|  * @license https://www.elastic.co/licensing/elastic-license | ||||
|  */ | ||||
| 
 | ||||
| namespace App\PaymentDrivers; | ||||
| namespace App\PaymentDrivers\Sample; | ||||
| 
 | ||||
| use App\Http\Requests\Payments\PaymentWebhookRequest; | ||||
| use App\Models\ClientGatewayToken; | ||||
|  | ||||
| @ -160,6 +160,7 @@ class CompanyTransformer extends EntityTransformer | ||||
|             'invoice_task_datelog' => (bool) $company->invoice_task_datelog, | ||||
|             'show_task_end_date' => (bool) $company->show_task_end_date, | ||||
|             'markdown_enabled' => (bool) $company->markdown_enabled, | ||||
|             'use_comma_as_decimal_place' => (bool) $company->use_comma_as_decimal_place, | ||||
|         ]; | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -0,0 +1,32 @@ | ||||
| <?php | ||||
| 
 | ||||
| use Illuminate\Database\Migrations\Migration; | ||||
| use Illuminate\Database\Schema\Blueprint; | ||||
| use Illuminate\Support\Facades\Schema; | ||||
| 
 | ||||
| class UseCommaAsDecimalPlaceCompaniesTable extends Migration | ||||
| { | ||||
|     /** | ||||
|      * Run the migrations. | ||||
|      * | ||||
|      * @return void | ||||
|      */ | ||||
|     public function up() | ||||
|     { | ||||
|          | ||||
|         Schema::table('companies', function (Blueprint $table) { | ||||
|             $table->boolean('use_comma_as_decimal_place')->default(0); | ||||
|         }); | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * Reverse the migrations. | ||||
|      * | ||||
|      * @return void | ||||
|      */ | ||||
|     public function down() | ||||
|     { | ||||
|         //
 | ||||
|     } | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user