mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 15:24:36 -04:00
Remove JSON backups from activities
This commit is contained in:
parent
f19bb5706c
commit
e8b3390c4b
@ -20,9 +20,7 @@ class NinjaTranslator extends Translator
|
|||||||
list($namespace, $group, $item) = $this->parseKey($key);
|
list($namespace, $group, $item) = $this->parseKey($key);
|
||||||
|
|
||||||
if(null === $locale)
|
if(null === $locale)
|
||||||
{
|
|
||||||
$locale = $this->locale;
|
$locale = $this->locale;
|
||||||
}
|
|
||||||
|
|
||||||
// Load given group defaults if exists
|
// Load given group defaults if exists
|
||||||
$this->load($namespace, $group, $locale);
|
$this->load($namespace, $group, $locale);
|
||||||
|
@ -64,12 +64,6 @@ class ActivityRepository extends BaseRepository
|
|||||||
{
|
{
|
||||||
$backup = new Backup();
|
$backup = new Backup();
|
||||||
|
|
||||||
// if(get_class($entity) == Client::class)
|
|
||||||
// $settings = $entity->getMergedSettings();
|
|
||||||
// else
|
|
||||||
// $settings = $entity->client->getMergedSettings();
|
|
||||||
// $entity->clientMergedDettings = $settings;
|
|
||||||
|
|
||||||
if (get_class($entity) == Client::class) {
|
if (get_class($entity) == Client::class) {
|
||||||
$entity->load('company');
|
$entity->load('company');
|
||||||
} elseif (get_class($entity) == User::class) {
|
} elseif (get_class($entity) == User::class) {
|
||||||
@ -77,15 +71,10 @@ class ActivityRepository extends BaseRepository
|
|||||||
$entity->load('company', 'client');
|
$entity->load('company', 'client');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$backup->html_backup = $this->generateEntityHtml($entity->getEntityDesigner(), $entity);
|
||||||
if (get_class($entity) == Invoice::class && ($activity->activity_type_id == Activity::MARK_SENT_INVOICE || $activity->activity_type_id == Activity::PAID_INVOICE)) {
|
|
||||||
//$backup->html_backup = $this->generateInvoiceHtml($entity->design(), $entity);
|
|
||||||
$backup->html_backup = $this->generateEntityHtml($entity->getEntityDesigner(), $entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$backup->activity_id = $activity->id;
|
$backup->activity_id = $activity->id;
|
||||||
$backup->json_backup = $entity->toJson();
|
$backup->json_backup = '';
|
||||||
|
//$backup->json_backup = $entity->toJson();
|
||||||
$backup->save();
|
$backup->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user