From ca72d4492a4d6f79aaf64b703c185cf650b18c8f Mon Sep 17 00:00:00 2001 From: Arturo Corro Date: Thu, 27 Mar 2025 14:47:40 -0600 Subject: [PATCH] first commit --- .editorconfig | 18 ++ .gitattributes | 38 ++++ .gitignore | 10 + .prettierignore | 16 ++ .prettierrc.json | 29 +++ CHANGELOG.md | 0 CONTRIBUTING.md | 0 LICENSE | 9 + Models/PriceList.php | 47 +++++ Models/ProductPrice.php | 61 ++++++ Providers/VuexyPosServiceProvider.php | 51 +++++ README.md | 16 ++ composer.json | 42 ++++ ...2473_create_product_store_prices_table.php | 46 +++++ ...12_19_109152_create_price_lists_tables.php | 76 +++++++ .../2024_12_19_112507_create_pos_tables.php | 192 ++++++++++++++++++ ...113050_add_pos_columns_to_stores_table.php | 62 ++++++ database/seeders/PriceListSeeder.php | 43 ++++ routes/admin.php | 9 + 19 files changed, 765 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 .prettierignore create mode 100644 .prettierrc.json create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 Models/PriceList.php create mode 100644 Models/ProductPrice.php create mode 100644 Providers/VuexyPosServiceProvider.php create mode 100644 README.md create mode 100644 composer.json create mode 100644 database/migrations/2024_12_19_092473_create_product_store_prices_table.php create mode 100644 database/migrations/2024_12_19_109152_create_price_lists_tables.php create mode 100644 database/migrations/2024_12_19_112507_create_pos_tables.php create mode 100644 database/migrations/2024_12_19_113050_add_pos_columns_to_stores_table.php create mode 100644 database/seeders/PriceListSeeder.php create mode 100644 routes/admin.php diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8f0de65 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 + +[docker-compose.yml] +indent_size = 4 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7333620 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,38 @@ +* text=auto eol=lf + +*.blade.php diff=html +*.css diff=css +*.html diff=html +*.md diff=markdown +*.php diff=php + +/.github export-ignore +CHANGELOG.md export-ignore +.styleci.yml export-ignore + +# Ignorar archivos de configuración y herramientas de desarrollo +.editorconfig export-ignore +.prettierrc.json export-ignore +.prettierignore export-ignore +.eslintrc.json export-ignore + +# Ignorar node_modules y dependencias locales +node_modules/ export-ignore +vendor/ export-ignore + +# Ignorar archivos de build +npm-debug.log export-ignore + +# Ignorar carpetas de logs y caché +storage/logs/ export-ignore +storage/framework/ export-ignore + +# Ignorar carpetas de compilación de frontend +public/build/ export-ignore +dist/ export-ignore + +# Ignorar archivos de CI/CD +.github/ export-ignore +.gitlab-ci.yml export-ignore +.vscode/ export-ignore +.idea/ export-ignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d07bec2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +/node_modules +/vendor +/.vscode +/.nova +/.fleet +/.phpactor.json +/.phpunit.cache +/.phpunit.result.cache +/.zed +/.idea diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..5d3dfee --- /dev/null +++ b/.prettierignore @@ -0,0 +1,16 @@ +# Dependencias de Composer y Node.js +/vendor/ +/node_modules/ + +# Caché y logs +/storage/ +*.log +*.cache + +# Archivos del sistema +.DS_Store +Thumbs.db + +# Configuración de editores +.idea/ +.vscode/ diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..5f11c9c --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,29 @@ +{ + "arrowParens": "avoid", + "bracketSpacing": true, + "bracketSameLine": true, + "htmlWhitespaceSensitivity": "css", + "insertPragma": false, + "jsxSingleQuote": true, + "printWidth": 120, + "proseWrap": "preserve", + "quoteProps": "as-needed", + "requirePragma": false, + "semi": true, + "singleQuote": true, + "tabWidth": 4, + "trailingComma": "none", + "useTabs": false, + "endOfLine": "lf", + "embeddedLanguageFormatting": "auto", + "overrides": [ + { + "files": [ + "resources/assets/**/*.js" + ], + "options": { + "semi": false + } + } + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e69de29 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..486d340 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2025 koneko + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Models/PriceList.php b/Models/PriceList.php new file mode 100644 index 0000000..5168826 --- /dev/null +++ b/Models/PriceList.php @@ -0,0 +1,47 @@ + 'integer', + 'status' => 'boolean', + ]; + + /** + * Relación con los precios de productos. + */ + public function productPrices(): HasMany + { + return $this->hasMany(ProductPrice::class, 'pricelist_id'); + } + + /** + * Relación con la moneda de la lista de precios. + */ + public function currency(): BelongsTo + { + return $this->belongsTo(Currency::class, 'c_currency', 'c_currency'); + } +} diff --git a/Models/ProductPrice.php b/Models/ProductPrice.php new file mode 100644 index 0000000..bd9ed53 --- /dev/null +++ b/Models/ProductPrice.php @@ -0,0 +1,61 @@ + 'decimal:6', + 'discount_percentage' => 'decimal:2', + 'final_price' => 'decimal:6', + 'taxes_transferred' => 'decimal:6', + 'taxes_retained' => 'decimal:6', + 'total_amount' => 'decimal:6', + 'valid_from' => 'date', + 'valid_to' => 'date', + 'min_quantity' => 'integer', + 'max_quantity' => 'integer', + ]; + + /** + * Relación con el producto. + */ + public function product(): BelongsTo + { + return $this->belongsTo(Product::class, 'product_id'); + } + + /** + * Relación con la lista de precios. + */ + public function priceList(): BelongsTo + { + return $this->belongsTo(PriceList::class, 'pricelist_id'); + } +} diff --git a/Providers/VuexyPosServiceProvider.php b/Providers/VuexyPosServiceProvider.php new file mode 100644 index 0000000..0613345 --- /dev/null +++ b/Providers/VuexyPosServiceProvider.php @@ -0,0 +1,51 @@ +loadRoutesFrom(__DIR__.'/../routes/admin.php'); + + + // Cargar vistas del paquete + $this->loadViewsFrom(__DIR__.'/../resources/views', 'vuexy-pos'); + + + // Register the migrations + $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); + + + // Registrar Livewire Components + $components = [ + //'cache-functions' => CacheFunctions::class, + ]; + + foreach ($components as $alias => $component) { + //Livewire::component($alias, $component); + } + + + // Registrar auditoría en usuarios + //User::observe(AuditableObserver::class); + } +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..1d75e61 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ + +

+ + Koneko Soluciones Tecnológicas Logo + +

+ +

+ Latest Stable Version + License + Email +

+ +--- + +# Laravel Vuexy \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..1ab17d9 --- /dev/null +++ b/composer.json @@ -0,0 +1,42 @@ +{ + "name": "koneko/laravel-vuexy-pos", + "description": "Laravel Vuexy POS para México, un modulo de Puntos de Venta optimizado para México.", + "keywords": ["laravel", "koneko", "framework", "vuexy", "pos", "point of sale", "tpv", "Terminal punto de venta", "mexico"], + "type": "library", + "license": "MIT", + "require": { + "php": "^8.2", + "koneko/laravel-exchange-rates-api": "dev-main", + "koneko/laravel-vuexy-warehouse": "dev-main", + "laravel/framework": "^11.31" + }, + "repositories": [ + { + "type": "path", + "url": "../laravel-vuexy-warehouse", + "options": { + "symlink": true + } + } + ], + "autoload": { + "psr-4": { + "Koneko\\VuexyPos\\": "./" + } + }, + "extra": { + "laravel": { + "providers": [ + "Koneko\\VuexyPos\\Providers\\VuexyPosServiceProvider" + ] + } + }, + "authors": [ + { + "name": "Arturo Corro Pacheco", + "email": "arturo@koneko.mx" + } + ], + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/database/migrations/2024_12_19_092473_create_product_store_prices_table.php b/database/migrations/2024_12_19_092473_create_product_store_prices_table.php new file mode 100644 index 0000000..adbe331 --- /dev/null +++ b/database/migrations/2024_12_19_092473_create_product_store_prices_table.php @@ -0,0 +1,46 @@ +mediumIncrements('id'); + + $table->unsignedMediumInteger('product_id')->index(); + $table->unsignedSmallInteger('store_id')->index(); + + $table->decimal('price', 9, 2)->unsigned()->default(0); + $table->char('currency', 3)->charset('ascii')->collation('ascii_general_ci'); + + $table->boolean('is_discounted')->index(); + $table->decimal('discount_price', 9, 2)->unsigned()->nullable(); + $table->date('discount_start')->nullable(); + $table->date('discount_end')->nullable(); + + // Auditoría + $table->timestamps(); + + // Relaciones + $table->foreign('product_id')->references('id')->on('products')->onUpdate('restrict')->onDelete('cascade'); + $table->foreign('store_id')->references('id')->on('stores')->onUpdate('restrict')->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('product_store_prices'); + Schema::dropIfExists('product_property'); + } +}; diff --git a/database/migrations/2024_12_19_109152_create_price_lists_tables.php b/database/migrations/2024_12_19_109152_create_price_lists_tables.php new file mode 100644 index 0000000..fc7c1e0 --- /dev/null +++ b/database/migrations/2024_12_19_109152_create_price_lists_tables.php @@ -0,0 +1,76 @@ +smallIncrements('id'); + + $table->string('name')->index(); + + $table->unsignedTinyInteger('type')->index(); + $table->char('c_currency', 3)->charset('ascii')->collation('ascii_general_ci')->nullable(); // Moneda + + $table->timestamps(); + + $table->unsignedTinyInteger('status'); + }); + + Schema::create('product_prices', function (Blueprint $table) { + $table->mediumIncrements('id'); + + $table->unsignedMediumInteger('product_id')->index(); // products.id + $table->unsignedSmallInteger('pricelist_id')->index(); // price_lists.id + + $table->decimal('unit_price', 13, 6)->unsigned()->nullable(); // Precio unitario + $table->decimal('discount_percentage', 5, 2)->unsigned()->nullable(); // Descuento % + $table->decimal('final_price', 13, 6)->unsigned()->nullable(); // Precio después del descuento + + $table->decimal('taxes_transferred', 13, 6)->unsigned()->nullable(); // Impuestos trasladados + $table->decimal('taxes_retained', 13, 6)->unsigned()->nullable(); // Impuestos retenidos + $table->decimal('total_amount', 13, 6)->unsigned()->nullable(); // Importe final + + $table->date('valid_from')->nullable(); // Fecha de inicio de validez + $table->date('valid_to')->nullable(); // Fecha de fin de validez + + $table->unsignedInteger('min_quantity')->nullable(); // Cantidad mínima para este precio + $table->unsignedInteger('max_quantity')->nullable(); // Cantidad máxima para este precio + + // Auditoría + $table->timestamps(); + + // Índices y restricciones + $table->unique(['product_id', 'pricelist_id', 'valid_from', 'valid_to', 'min_quantity', 'max_quantity'])->name('product_pricelist_valid_from_to_min_max_quantity'); + + // Relaciones + $table->foreign('product_id') + ->references('id') + ->on('products') + ->onUpdate('restrict') + ->onDelete('cascade'); + + $table->foreign('pricelist_id') + ->references('id') + ->on('price_lists') + ->onUpdate('restrict') + ->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('price_lists'); + Schema::dropIfExists('product_prices'); + } +}; diff --git a/database/migrations/2024_12_19_112507_create_pos_tables.php b/database/migrations/2024_12_19_112507_create_pos_tables.php new file mode 100644 index 0000000..ca1f9b9 --- /dev/null +++ b/database/migrations/2024_12_19_112507_create_pos_tables.php @@ -0,0 +1,192 @@ +mediumIncrements('id'); + + $table->unsignedSmallInteger('store_id')->index(); + + $table->unsignedTinyInteger('document_type')->index(); // Tipo de documento (venta, cotización, Remisión, Nota de credito) + $table->unsignedMediumInteger('document_id')->nullable(); // UID específico por tienda + + $table->unsignedMediumInteger('seller_id')->index(); // ID del vendedor + $table->unsignedMediumInteger('customer_id')->nullable(); // ID del cliente + $table->unsignedMediumInteger('customer_tax_id')->nullable(); // ID del cliente para impuestos + + $table->decimal('quantity', 13, 6)->unsigned()->nullable(); + + $table->datetime('transaction_date')->index(); // Fecha de la transacción + $table->date('date_to_pay')->nullable()->index(); + + $table->char('moneda', 3)->index(); + $table->decimal('tipo_de_cambio', 12, 4)->nullable(); // Sin unsigned para permitir valores negativos si es necesario + + $table->char('c_uso_cfdi', 4)->charset('ascii')->collation('ascii_general_ci')->nullable()->index(); + $table->char('c_metodo_pago', 3)->nullable()->index(); // c_metodo_pago.c_metodo_pago + $table->string('condiciones_de_pago', 512)->nullable()->index(); + + $table->decimal('subtotal', 9, 2)->unsigned()->default(0); + $table->decimal('impuestos_trasladados', 9, 2)->unsigned()->default(0); + $table->decimal('impuestos_retenidos', 9, 2)->unsigned()->default(0); + $table->decimal('amount', 9, 2)->unsigned()->default(0); + $table->decimal('paid_amount', 9, 2)->unsigned()->default(0); + + $table->mediumText('document_notes')->nullable(); // Notas adicionales + $table->json('internal_notes')->nullable(); + + $table->boolean('should_send_ticket')->nullable(); // + $table->boolean('should_send_invoice')->nullable(); // + + $table->boolean('print_ticket')->nullable(); + $table->boolean('print_invoice')->nullable(); + $table->boolean('print_payment_peceipt')->nullable(); // + + $table->unsignedTinyInteger('transaction_status')->index(); // Estatus de la orden ('pending', 'approved', 'received', 'cancelled') + $table->unsignedTinyInteger('payment_status')->nullable()->index(); + $table->unsignedTinyInteger('billing_status')->nullable()->index(); + $table->unsignedTinyInteger('delivery_status')->nullable()->index(); // 'pending', 'processing', 'shipped', 'delivered', 'canceled', no requiere envio, cliente recoge + + $table->softDeletes(); + $table->timestamps(); + + + $table->index(['store_id', 'document_type', 'document_id']); + $table->index(['store_id', 'document_type', 'date_to_pay']); + $table->index(['store_id', 'document_type', 'transaction_date'])->name('purchase_transactions_store_document_date_index'); + $table->index(['store_id', 'document_type', 'transaction_date', 'seller_id'])->name('purchase_transactions_store_document_date_seller_index'); + $table->index(['store_id', 'document_type', 'transaction_date', 'customer_id'])->name('purchase_transactions_store_document_date_customer_index'); + $table->index(['store_id', 'document_type', 'transaction_date', 'customer_tax_id'])->name('purchase_transactions_store_document_date_customer_tax_index'); + + $table->foreign('store_id') + ->references('id') + ->on('stores') + ->onDelete('restrict'); + + $table->foreign('seller_id') + ->references('id') + ->on('users') + ->onDelete('restrict'); + + $table->foreign('customer_id') + ->references('id') + ->on('users') + ->onDelete('restrict'); + + $table->foreign('customer_tax_id') + ->references('id') + ->on('users') + ->onDelete('restrict'); + + $table->foreign('c_uso_cfdi') + ->references('c_uso_cfdi') + ->on('sat_uso_cfdi') + ->onDelete('restrict'); + + }); + + Schema::create('sales_transactions_concepts', function (Blueprint $table) { + $table->mediumIncrements('id'); + + $table->unsignedMediumInteger('sales_transaction_id')->index(); // sales.id + + $table->decimal('cantidad', 13, 6)->unsigned(); + $table->unsignedMediumInteger('product_id')->index(); // products.id + $table->string('no_identificacion', 100)->nullable()->index(); + $table->string('descripcion'); + $table->string('c_clave_unidad', 3)->nullable()->index(); // sat_clave_unidad.c_clave_unidad + + $table->decimal('cost', 13, 6)->unsigned()->default(0); + + $table->mediumText('observations')->nullable(); + + $table->decimal('valorunitario', 13, 6)->unsigned(); + $table->decimal('importe', 13, 6)->unsigned(); + + $table->unsignedTinyInteger('c_objeto_imp')->nullable()->index(); // sat_objeto_imp.c_objeto_imp + + $table->json('impuestos')->nullable(); + $table->decimal('impuestos_trasladados', 13, 6)->unsigned()->default(0); + $table->decimal('impuestos_retenidos', 13, 6)->unsigned()->default(0); + + + // Indices + $table->foreign('sales_transaction_id') + ->references('id') + ->on('sales_transactions') + ->onUpdate('restrict') + ->onDelete('cascade'); + + $table->foreign('product_id') + ->references('id') + ->on('products') + ->onUpdate('restrict') + ->onDelete('restrict'); + + $table->foreign('c_clave_unidad') + ->references('c_clave_unidad') + ->on('sat_clave_unidad') + ->onUpdate('restrict') + ->onDelete('restrict'); + }); + + Schema::table('users', function (Blueprint $table) { + $table->unsignedSmallInteger('pricelist_id') // dropdown_lists.id + ->after('c_uso_cfdi') + ->nullable(); + + $table->unsignedTinyInteger('enable_credit') + ->after('pricelist_id') + ->nullable(); + + $table->unsignedSmallInteger('credit_days') + ->after('enable_credit') + ->nullable(); + + $table->decimal('credit_limit', 14, 2) + ->after('credit_days') + ->nullable(); + + // Indices + $table->foreign('pricelist_id') + ->references('id') + ->on('price_lists') + ->onUpdate('restrict') + ->onDelete('restrict'); + }); + + /* + DB::unprepared('CREATE TRIGGER prevent_pricelist_delete + BEFORE DELETE ON dropdown_lists + FOR EACH ROW + BEGIN + IF EXISTS (SELECT 1 FROM users WHERE pricelist_id = OLD.id) THEN + SIGNAL SQLSTATE "45000" SET MESSAGE_TEXT = "No se puede eliminar la lista de precios porque está en uso por un usuario"; + END IF; + END;'); + */ + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('sales_transactions'); + DB::unprepared('DROP TRIGGER IF EXISTS sales_transactions_before_insert'); + + Schema::dropIfExists('sales_transactions_concepts'); + + DB::unprepared('DROP TRIGGER IF EXISTS prevent_pricelist_delete'); + } +}; diff --git a/database/migrations/2024_12_19_113050_add_pos_columns_to_stores_table.php b/database/migrations/2024_12_19_113050_add_pos_columns_to_stores_table.php new file mode 100644 index 0000000..fce17ac --- /dev/null +++ b/database/migrations/2024_12_19_113050_add_pos_columns_to_stores_table.php @@ -0,0 +1,62 @@ +string('serie_ordenes_compra', 50)->nullable()->after('domicilio_fiscal'); + $table->string('serie_compras', 50)->nullable()->after('serie_ordenes_compra'); + $table->string('serie_gastos', 50)->nullable()->after('serie_compras'); + $table->string('serie_cotizaciones', 50)->nullable()->after('serie_gastos'); + $table->string('serie_ventas', 50)->nullable()->after('serie_cotizaciones'); + $table->string('serie_remisiones', 50)->nullable()->after('serie_ventas'); + $table->string('serie_notas_credito', 50)->nullable()->after('serie_remisiones'); + $table->string('serie_pagos', 50)->nullable()->after('serie_notas_credito'); + $table->string('serie_traspasos', 50)->nullable()->after('serie_pagos'); + $table->string('serie_ajustes_inventario', 50)->nullable()->after('serie_traspasos'); + + // Configuración del ticket + $table->unsignedTinyInteger('ticket_digital')->nullable()->after('serie_ajustes_inventario'); + $table->boolean('ticket_digital_show_customer')->nullable()->after('ticket_digital'); + $table->boolean('ticket_digital_show_email')->nullable()->after('ticket_digital_show_customer'); + $table->boolean('ticket_digital_show_address')->nullable()->after('ticket_digital_show_email'); + $table->boolean('ticket_digital_show_unit_price')->nullable()->after('ticket_digital_show_address'); + $table->boolean('ticket_digital_show_taxes')->nullable()->after('ticket_digital_show_unit_price'); + $table->boolean('ticket_digital_show_import')->nullable()->after('ticket_digital_show_taxes'); + $table->unsignedTinyInteger('ticket_printed')->nullable()->after('ticket_digital_show_import'); + $table->boolean('ticket_show_customer')->nullable()->after('ticket_printed'); + $table->boolean('ticket_show_email')->nullable()->after('ticket_show_customer'); + $table->boolean('ticket_show_address')->nullable()->after('ticket_show_email'); + $table->boolean('ticket_show_unit_price')->nullable()->after('ticket_show_address'); + $table->boolean('ticket_show_taxes')->nullable()->after('ticket_show_unit_price'); + $table->boolean('ticket_show_import')->nullable()->after('ticket_show_taxes'); + $table->string('ticket_image_path', 255)->nullable()->after('ticket_show_import'); + $table->mediumText('ticket_image_base64', 255)->nullable()->after('ticket_image_path'); + $table->string('ticket_header', 255)->nullable()->after('ticket_image_base64'); + $table->string('ticket_footer', 255)->nullable()->after('ticket_header'); + $table->string('ticket_footer_2', 255)->nullable()->after('ticket_footer'); + $table->boolean('ticket_enable_cash_register')->nullable()->after('ticket_footer_2'); + $table->unsignedTinyInteger('ticket_cash_register')->nullable()->after('ticket_enable_cash_register'); + $table->boolean('ticket_enable_warehouse')->nullable()->after('ticket_cash_register'); + $table->unsignedTinyInteger('ticket_warehouse')->nullable()->after('ticket_enable_warehouse'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + + + } +}; diff --git a/database/seeders/PriceListSeeder.php b/database/seeders/PriceListSeeder.php new file mode 100644 index 0000000..4994eda --- /dev/null +++ b/database/seeders/PriceListSeeder.php @@ -0,0 +1,43 @@ + 'pos_pricelist', + 'single' => 'Público en general', + 'param1' => 1, + 'param2' => 30, + 'order' => 0, + 'status' => DropdownList::STATUS_ENABLED, + ], + [ + 'label' => 'pos_pricelist', + 'single' => 'Preferente', + 'param1' => 1, + 'param2' => 15, + 'order' => 0, + 'status' => DropdownList::STATUS_ENABLED, + ], + ]; + + foreach ($divisas_array as $divisa) { + DropdownList::create($divisa); + }; + } +} + + + diff --git a/routes/admin.php b/routes/admin.php new file mode 100644 index 0000000..9d28ee5 --- /dev/null +++ b/routes/admin.php @@ -0,0 +1,9 @@ +name('admin.sales.')->middleware(['web', 'auth', 'admin'])->group(function () { + +});