mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:44:32 -04:00
fixes for casts (#3382)
This commit is contained in:
parent
a74b644f6a
commit
628b77e369
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace App\Utils\Traits;
|
namespace App\Utils\Traits;
|
||||||
|
|
||||||
|
use App\DataMapper\BaseSettings;
|
||||||
use App\DataMapper\CompanySettings;
|
use App\DataMapper\CompanySettings;
|
||||||
use App\DataMapper\FeesAndLimits;
|
use App\DataMapper\FeesAndLimits;
|
||||||
|
|
||||||
@ -83,11 +84,13 @@ trait CompanyGatewayFeesAndLimitsSaver
|
|||||||
{
|
{
|
||||||
$new_arr = [];
|
$new_arr = [];
|
||||||
|
|
||||||
|
|
||||||
foreach ($fees_and_limits as $key => $value) {
|
foreach ($fees_and_limits as $key => $value) {
|
||||||
$fal = new FeesAndLimits;
|
$fal = new FeesAndLimits;
|
||||||
|
|
||||||
foreach ($value as $k => $v) {
|
foreach ($value as $k => $v) {
|
||||||
$fal->{$k} = $v;
|
$fal->{$k} = $v;
|
||||||
|
$fal->{$k} = BaseSettings::castAttribute(FeesAndLimits::$casts[$k], $v);
|
||||||
}
|
}
|
||||||
|
|
||||||
$new_arr[$key] = (array)$fal;
|
$new_arr[$key] = (array)$fal;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user