<?php
namespace App\Validation;

// use App\Validation\GeneralRulesMessasges;
/**
 * This class contains statics methods to access multiple rules and valitations
 * used un Sales controller
 */
class SalesValidation extends GeneralValidations
{
    public static function newSaleRules()
    {
        return [
            'type_pos' => 'required',
            'posbiller' => 'required',
            'doc_type_id' => 'required',
            'warehouse' => 'required',
            'seller' => 'required',
            'customer' => 'required',
            'customer_price_group_id' => 'required',
            'customer_group_id' => 'required',
            'customer_branch' => 'required',
            'product_id' => 'required',
            'product_type' => 'required',
            'product_code' => 'required',
            'product_name' => 'required',
            'product_discount' => 'required',
            'product_discount_val' => 'required',
            'product_tax' => 'required',
            'product_tax_rate' => 'required',
            'unit_product_tax' => 'required',
            'product_tax_val' => 'required',
            'net_price' => 'required',
            'unit_price' => 'required',
            'real_unit_price' => 'required',
            'quantity' => 'required',
            'product_unit' => 'required',
            'product_unit_id_selected' => 'required',
            'product_base_quantity' => 'required',
            'biller' => 'required',
            'amount' => 'required',
            'paid_by' => 'required',
            'total_items' => 'required',
            'document_type_id' => 'required',
            'seller_id' => 'required',
            'address_id' => 'required',
        ];
    }

    public static function newSaleMessages()
    {
        return [
            'type_pos' => [
                'required' => 'El campo type_pos es requerido',
            ],
            'posbiller' => [
                'required' => 'El campo posbiller es requerido',
            ],
            'doc_type_id' => [
                'required' => 'El campo doc_type_id es requerido',
            ],
            'warehouse' => [
                'required' => 'El campo warehouse es requerido',
            ],
            'seller' => [
                'required' => 'El campo seller es requerido',
            ],
            'customer' => [
                'required' => 'El campo customer es requerido',
            ],
            'customer_price_group_id' => [
                'required' => 'El campo customer_price_group_id es requerido',
            ],
            'customer_group_id' => [
                'required' => 'El campo customer_group_id es requerido',
            ],
            'customer_branch' => [
                'required' => 'El campo customer_branch es requerido',
            ],
            'product_id' => [
                'required' => 'El campo product_id es requerido',
            ],
            'product_type' => [
                'required' => 'El campo product_type es requerido',
            ],
            'product_code' => [
                'required' => 'El campo product_code es requerido',
            ],
            'product_name' => [
                'required' => 'El campo product_name es requerido',
            ],
            'product_discount' => [
                'required' => 'El campo product_discount es requerido',
            ],
            'product_discount_val' => [
                'required' => 'El campo product_discount_val es requerido',
            ],
            'product_tax' => [
                'required' => 'El campo product_tax es requerido',
            ],
            'product_tax_rate' => [
                'required' => 'El campo product_tax_rate es requerido',
            ],
            'unit_product_tax' => [
                'required' => 'El campo unit_product_tax es requerido',
            ],
            'product_tax_val' => [
                'required' => 'El campo product_tax_val es requerido',
            ],
            'net_price' => [
                'required' => 'El campo net_price es requerido',
            ],
            'unit_price' => [
                'required' => 'El campo unit_price es requerido',
            ],
            'real_unit_price' => [
                'required' => 'El campo real_unit_price es requerido',
            ],
            'quantity' => [
                'required' => 'El campo quantity es requerido',
            ],
            'product_unit' => [
                'required' => 'El campo product_unit es requerido',
            ],
            'product_unit_id_selected' => [
                'required' => 'El campo product_unit_id_selected es requerido',
            ],
            'product_base_quantity' => [
                'required' => 'El campo product_base_quantity es requerido',
            ],
            'biller' => [
                'required' => 'El campo biller es requerido',
            ],
            'amount' => [
                'required' => 'El campo amount es requerido',
            ],
            'paid_by' => [
                'required' => 'El campo paid_by es requerido',
            ],
            'total_items' => [
                'required' => 'El campo total_items es requerido',
            ],
            'document_type_id' => [
                'required' => 'El campo document_type_id es requerido',
            ],
            'seller_id' => [
                'required' => 'El campo seller_id es requerido',
            ],
            'address_id' => [
                'required' => 'El campo address_id es requerido',
            ],
        ];
    }
}
