mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Clean up
This commit is contained in:
parent
25f8cd249d
commit
92e2c7c614
@ -75,8 +75,10 @@ class BackupUpdate extends Command
|
|||||||
|
|
||||||
private function handleOnDb()
|
private function handleOnDb()
|
||||||
{
|
{
|
||||||
|
set_time_limit(0);
|
||||||
|
|
||||||
Backup::whereHas('activity')->whereNotNull('html_backup')->cursor()->each(function($backup){
|
Backup::chunk(100, function ($backups) {
|
||||||
|
foreach ($backups as $backup) {
|
||||||
|
|
||||||
if($backup->activity->client()->exists()){
|
if($backup->activity->client()->exists()){
|
||||||
|
|
||||||
@ -85,6 +87,7 @@ class BackupUpdate extends Command
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -417,6 +417,7 @@ class CheckData extends Command
|
|||||||
payments.id = paymentables.payment_id
|
payments.id = paymentables.payment_id
|
||||||
WHERE paymentable_type = 'App\\Models\\Credit'
|
WHERE paymentable_type = 'App\\Models\\Credit'
|
||||||
AND paymentables.deleted_at is NULL
|
AND paymentables.deleted_at is NULL
|
||||||
|
AND payments.is_deleted = 0
|
||||||
AND payments.client_id = ?;
|
AND payments.client_id = ?;
|
||||||
"), [$client->id] );
|
"), [$client->id] );
|
||||||
|
|
||||||
|
@ -265,15 +265,16 @@ class MigrationController extends BaseController
|
|||||||
|
|
||||||
foreach($request->all() as $input){
|
foreach($request->all() as $input){
|
||||||
|
|
||||||
if($input instanceof UploadedFile)
|
if($input instanceof UploadedFile){
|
||||||
nlog('is file');
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
$companies[] = json_decode($input,1);
|
$companies[] = json_decode($input,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (app()->environment() === 'local') {
|
if (app()->environment() === 'local') {
|
||||||
nlog($request->all());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -133,8 +133,6 @@ class TemplateEmail extends Mailable
|
|||||||
|
|
||||||
$ubl_string = CreateUbl::dispatchNow($this->invitation->invoice);
|
$ubl_string = CreateUbl::dispatchNow($this->invitation->invoice);
|
||||||
|
|
||||||
nlog($ubl_string);
|
|
||||||
|
|
||||||
if($ubl_string)
|
if($ubl_string)
|
||||||
$this->attachData($ubl_string, $this->invitation->invoice->getFileName('xml'));
|
$this->attachData($ubl_string, $this->invitation->invoice->getFileName('xml'));
|
||||||
|
|
||||||
|
@ -26,10 +26,10 @@ class Backup extends BaseModel
|
|||||||
return $this->belongsTo(Activity::class);
|
return $this->belongsTo(Activity::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function storeRemotely(string $html, Client $client)
|
public function storeRemotely(?string $html, Client $client)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(strlen($html) == 0)
|
if(!$html || strlen($html) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$path = $client->backup_path() . "/";
|
$path = $client->backup_path() . "/";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user