mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 14:12:15 +00:00
New cron job for bills.
This commit is contained in:
@@ -51,7 +51,7 @@ class BillFactory
|
||||
{
|
||||
Log::debug(sprintf('Now in %s', __METHOD__), $data);
|
||||
$factory = app(TransactionCurrencyFactory::class);
|
||||
$currency = $factory->find((int)($data['currency_id'] ?? null), (string)($data['currency_code'] ?? null)) ??
|
||||
$currency = $factory->find((int) ($data['currency_id'] ?? null), (string) ($data['currency_code'] ?? null)) ??
|
||||
app('amount')->getDefaultCurrencyByUser($this->user);
|
||||
|
||||
try {
|
||||
@@ -82,7 +82,7 @@ class BillFactory
|
||||
}
|
||||
|
||||
if (array_key_exists('notes', $data)) {
|
||||
$this->updateNote($bill, (string)$data['notes']);
|
||||
$this->updateNote($bill, (string) $data['notes']);
|
||||
}
|
||||
$objectGroupTitle = $data['object_group_title'] ?? '';
|
||||
if ('' !== $objectGroupTitle) {
|
||||
@@ -93,7 +93,7 @@ class BillFactory
|
||||
}
|
||||
}
|
||||
// try also with ID:
|
||||
$objectGroupId = (int)($data['object_group_id'] ?? 0);
|
||||
$objectGroupId = (int) ($data['object_group_id'] ?? 0);
|
||||
if (0 !== $objectGroupId) {
|
||||
$objectGroup = $this->findObjectGroupById($objectGroupId);
|
||||
if (null !== $objectGroup) {
|
||||
@@ -113,8 +113,8 @@ class BillFactory
|
||||
*/
|
||||
public function find(?int $billId, ?string $billName): ?Bill
|
||||
{
|
||||
$billId = (int)$billId;
|
||||
$billName = (string)$billName;
|
||||
$billId = (int) $billId;
|
||||
$billName = (string) $billName;
|
||||
$bill = null;
|
||||
// first find by ID:
|
||||
if ($billId > 0) {
|
||||
|
||||
Reference in New Issue
Block a user