From fbddb23f53e896afa11cfb80b317b0620c665e66 Mon Sep 17 00:00:00 2001 From: marina Date: Wed, 27 Nov 2024 11:06:06 +0300 Subject: [PATCH] =?utf8?q?ERP-243=20=D0=94=D0=B5=D0=B9=D1=81=D1=82=D0=B2?= =?utf8?q?=D0=B8=D1=8F=20=D0=BF=D0=BE=20=D0=B7=D0=B0=D0=BC=D0=B5=D0=BD?= =?utf8?q?=D0=B5=20(II=20=D1=8D=D1=82=D0=B0=D0=BF)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ...064206_add_new_column_on_shift_remains.php | 19 +++++++++ ...5457_create_equalization_remains_table.php | 41 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 erp24/migrations/m241126_064206_add_new_column_on_shift_remains.php create mode 100644 erp24/migrations/m241127_065457_create_equalization_remains_table.php diff --git a/erp24/migrations/m241126_064206_add_new_column_on_shift_remains.php b/erp24/migrations/m241126_064206_add_new_column_on_shift_remains.php new file mode 100644 index 00000000..b29a3629 --- /dev/null +++ b/erp24/migrations/m241126_064206_add_new_column_on_shift_remains.php @@ -0,0 +1,19 @@ +addColumn('shift_remains', 'type', $this->integer()->notNull()->defaultValue(1)->comment('Тип записи')); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + $this->dropColumn('shift_remains', 'type'); + } +} diff --git a/erp24/migrations/m241127_065457_create_equalization_remains_table.php b/erp24/migrations/m241127_065457_create_equalization_remains_table.php new file mode 100644 index 00000000..4eb99356 --- /dev/null +++ b/erp24/migrations/m241127_065457_create_equalization_remains_table.php @@ -0,0 +1,41 @@ +createTable('erp24.equalization_remains', [ + 'id' => $this->primaryKey()->comment('ID записи'), + 'shift_id' => $this->integer()->comment('ID записи передачи смены'), + 'product_id' => $this->string()->comment('ID товара с недостатком'), + 'product_count' => $this->float()->comment('Количество товара с недостатком'), + 'product_price' => $this->float()->comment('Цена товара розничная'), + 'product_price_seft_cost' => $this->float()->comment('Себестоимость товара'), + 'product_replacement_id' => $this->string()->comment('Товар замена'), + 'product_replacement_count' => $this->float()->comment('Количество товара замены'), + 'product_replacement_price' => $this->float()->comment('Цена товара замены розничная'), + 'product_replacement_price_seft_cost' => $this->float()->comment('Себестоимость товара замены'), + 'balance' => $this->float()->comment('Разница в сумме'), + 'created_at' => $this->dateTime()->comment('Дата создания записи'), + 'updated_at' => $this->dateTime()->comment('Дата обновления записи'), + 'created_by' => $this->integer()->comment('Автор создания записи'), + 'updated_by' => $this->integer()->comment('Автор обновления записи'), + ]); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + $this->dropTable('equalization_remains'); + } +} -- 2.39.5