diff --git a/app/Console/Commands/CheckData.php b/app/Console/Commands/CheckData.php index 7b7f45871f9c..0848ecbb4e64 100644 --- a/app/Console/Commands/CheckData.php +++ b/app/Console/Commands/CheckData.php @@ -400,7 +400,6 @@ class CheckData extends Command ], 'products' => [ ENTITY_USER, - ENTITY_TAX_RATE, ], 'vendors' => [ ENTITY_USER, @@ -415,25 +414,17 @@ class CheckData extends Command ENTITY_USER, ENTITY_CLIENT, ], - 'accounts' => [ - ENTITY_TAX_RATE, - ] ]; foreach ($tables as $table => $entityTypes) { foreach ($entityTypes as $entityType) { $tableName = Utils::pluralizeEntityType($entityType); - if ($entityType == ENTITY_TAX_RATE) { - $field = 'default_' . $entityType; - } else { - $field = $entityType; - } + $field = $entityType; if ($table == 'accounts') { $accountId = 'id'; } else { $accountId = 'account_id'; } - $records = DB::table($table) ->join($tableName, "{$tableName}.id", '=', "{$table}.{$field}_id") ->where("{$table}.{$accountId}", '!=', DB::raw("{$tableName}.account_id")) diff --git a/app/Ninja/Transformers/PaymentTransformer.php b/app/Ninja/Transformers/PaymentTransformer.php index fd58f127f440..ff78eff829b1 100644 --- a/app/Ninja/Transformers/PaymentTransformer.php +++ b/app/Ninja/Transformers/PaymentTransformer.php @@ -59,7 +59,7 @@ class PaymentTransformer extends EntityTransformer 'payment_type_id' => (int) $payment->payment_type_id, 'invoice_id' => (int) ($this->invoice ? $this->invoice->public_id : $payment->invoice->public_id), 'invoice_number' => $this->invoice ? $this->invoice->invoice_number : $payment->invoice->invoice_number, - 'private_notes' => $client->private_notes, + 'private_notes' => $payment->private_notes, ]); } }