Formato correcto de fecha

This commit is contained in:
Juan Pablo Vial
2025-05-13 20:10:46 -04:00
parent 148d08089d
commit f07c1f1cbd
3 changed files with 6 additions and 6 deletions

View File

@ -36,13 +36,13 @@ class Customer extends Ideal\Repository
{ {
$model->id = $this->saveNew( $model->id = $this->saveNew(
['rut', 'toku_id', 'created_at'], ['rut', 'toku_id', 'created_at'],
[implode('', [$model->persona->rut, $model->persona->digito]), $model->toku_id, (new DateTimeImmutable())->format('Y-m-d H:i:s.u')] [implode('', [$model->persona->rut, $model->persona->digito]), $model->toku_id, (new DateTimeImmutable())->format('Y-m-d H:i:s')]
); );
return $model; return $model;
} }
public function edit(Define\Model $model, array $new_data): Model\Venta\MediosPago\Toku\Customer public function edit(Define\Model $model, array $new_data): Model\Venta\MediosPago\Toku\Customer
{ {
return $this->update($model, ['rut', 'toku_id', 'updated_at'], array_merge($new_data, ['updated_at' => (new DateTimeImmutable())->format('Y-m-d H:i:s.u')])); return $this->update($model, ['rut', 'toku_id', 'updated_at'], array_merge($new_data, ['updated_at' => (new DateTimeImmutable())->format('Y-m-d H:i:s')]));
} }
/** /**

View File

@ -33,13 +33,13 @@ class Invoice extends Ideal\Repository
{ {
$model->id = $this->saveNew( $model->id = $this->saveNew(
['cuota_id', 'toku_id', 'created_at'], ['cuota_id', 'toku_id', 'created_at'],
[$model->cuota->id, $model->toku_id, (new DateTimeImmutable())->format('Y-m-d H:i:s.u')] [$model->cuota->id, $model->toku_id, (new DateTimeImmutable())->format('Y-m-d H:i:s')]
); );
return $model; return $model;
} }
public function edit(Define\Model $model, array $new_data): Model\Venta\MediosPago\Toku\Invoice public function edit(Define\Model $model, array $new_data): Model\Venta\MediosPago\Toku\Invoice
{ {
return $this->update($model, ['cuota_id', 'toku_id', 'updated_at'], array_merge($new_data, ['updated_at' => (new DateTimeImmutable())->format('Y-m-d H:i:s.u')])); return $this->update($model, ['cuota_id', 'toku_id', 'updated_at'], array_merge($new_data, ['updated_at' => (new DateTimeImmutable())->format('Y-m-d H:i:s')]));
} }
/** /**

View File

@ -34,13 +34,13 @@ class Subscription extends Ideal\Repository
{ {
$model->id = $this->saveNew( $model->id = $this->saveNew(
['venta_id', 'toku_id', 'created_at'], ['venta_id', 'toku_id', 'created_at'],
[$model->venta->id, $model->toku_id, (new DateTimeImmutable())->format('Y-m-d H:i:s.u')] [$model->venta->id, $model->toku_id, (new DateTimeImmutable())->format('Y-m-d H:i:s')]
); );
return $model; return $model;
} }
public function edit(Define\Model $model, array $new_data): Model\Venta\MediosPago\Toku\Subscription public function edit(Define\Model $model, array $new_data): Model\Venta\MediosPago\Toku\Subscription
{ {
return $this->update($model, ['venta_id', 'toku_id', 'updated_at'], array_merge($new_data, ['updated_at' => (new DateTimeImmutable())->format('Y-m-d H:i:s.u')])); return $this->update($model, ['venta_id', 'toku_id', 'updated_at'], array_merge($new_data, ['updated_at' => (new DateTimeImmutable())->format('Y-m-d H:i:s')]));
} }
public function fetchByVenta(int $venta_id): Model\Venta\MediosPago\Toku\Subscription public function fetchByVenta(int $venta_id): Model\Venta\MediosPago\Toku\Subscription