--
--

\restrict 8Bn0DiBdwyyZoY4bUDdlX59Rhq4avppa9nlAgJT97U2JZUw8UfRjXZDrDptjqQm


SET transaction_timeout = 0;
SELECT pg_catalog.set_config('search_path', '', false);

--
-- Name: public; Type: SCHEMA; Schema: -; Owner: -
--

-- *not* creating schema, since initdb creates it


--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: -
--

COMMENT ON SCHEMA public IS '';




--
-- Name: account_mappings; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.account_mappings (
    id integer NOT NULL,
    mapping_code character varying(50) NOT NULL,
    mapping_name character varying(100) NOT NULL,
    account_id integer NOT NULL,
    description text,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: account_mappings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.account_mappings ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.account_mappings_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: account_transactions; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.account_transactions (
    id integer NOT NULL,
    store_id integer,
    branch_id integer DEFAULT 1 NOT NULL,
    sale_id integer,
    account_type character varying(50) NOT NULL,
    account_id integer,
    cheque_id integer,
    card_type_id integer,
    card_last_four character varying(4),
    card_transaction_ref character varying(100),
    is_reconciled boolean DEFAULT false NOT NULL,
    amount numeric(10,2) NOT NULL,
    tip_amount numeric(10,2) DEFAULT 0.00,
    description character varying(255),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: account_transactions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.account_transactions ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.account_transactions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: account_types; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.account_types (
    id integer NOT NULL,
    type_code character varying(10) NOT NULL,
    type_name character varying(50) NOT NULL,
    default_side character varying(255) NOT NULL,
    description text,
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: account_types_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.account_types ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.account_types_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: bank_access; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.bank_access (
    user_id integer NOT NULL,
    bank_account_id integer NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    created_by integer
);


--
-- Name: bank_accounts; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.bank_accounts (
    id integer NOT NULL,
    bank_name character varying(100) NOT NULL,
    account_title character varying(150) NOT NULL,
    chart_of_account_id integer,
    mapped_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    mapped_by integer,
    account_number character varying(50) NOT NULL,
    iban character varying(50),
    branch_name character varying(100),
    branch_code character varying(50),
    swift_code character varying(50),
    address text,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: bank_accounts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.bank_accounts ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.bank_accounts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: bom_components; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.bom_components (
    id integer NOT NULL,
    bom_id integer NOT NULL,
    component_item_id integer NOT NULL,
    quantity numeric(12,6) NOT NULL
);


--
-- Name: bom_components_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.bom_components ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.bom_components_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: bom_master; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.bom_master (
    id integer NOT NULL,
    item_id integer NOT NULL,
    description text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: bom_master_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.bom_master ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.bom_master_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: branch_access; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.branch_access (
    user_id integer NOT NULL,
    branch_id integer NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    created_by integer
);


--
-- Name: branch_info; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.branch_info (
    id integer NOT NULL,
    default_store_id integer,
    branch_name character varying(255),
    branch_code character varying(20),
    branch_address text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    license_key character varying(100),
    machine_id character varying(255),
    last_verified_at timestamp without time zone,
    license_cache text,
    ntn character varying(30),
    strn character varying(30),
    branch_phone character varying(50),
    facebook_url character varying(255),
    instagram_url character varying(255),
    youtube_url character varying(255),
    province character varying(100) DEFAULT 'Punjab'::character varying,
    is_active boolean DEFAULT true,
    branch_type character varying(255) DEFAULT 'branch'::character varying,
    is_default boolean DEFAULT false
);


--
-- Name: branch_info_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.branch_info ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.branch_info_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: card_types; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.card_types (
    id integer NOT NULL,
    card_code character varying(50) NOT NULL,
    card_name character varying(100) NOT NULL,
    display_name character varying(100),
    icon_class character varying(100) DEFAULT 'fas fa-credit-card'::character varying,
    color_class character varying(100) DEFAULT 'btn-outline-primary'::character varying,
    default_charge_rate numeric(5,2) DEFAULT 0.00,
    sort_order integer DEFAULT 0,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: card_types_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.card_types ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.card_types_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: categories; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.categories (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    icon character varying(255) DEFAULT 'assets/img/categories/category-01.png'::character varying
);


--
-- Name: categories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.categories ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.categories_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: chart_of_accounts; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.chart_of_accounts (
    id integer NOT NULL,
    account_code character varying(20) NOT NULL,
    account_name character varying(100) NOT NULL,
    account_type character varying(255) NOT NULL,
    account_category character varying(255) NOT NULL,
    parent_account_id integer,
    account_level integer DEFAULT 1,
    is_active boolean DEFAULT true,
    description text,
    opening_balance numeric(15,2) DEFAULT 0.00,
    current_balance numeric(15,2) DEFAULT 0.00,
    store_id integer DEFAULT 1,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: chart_of_accounts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.chart_of_accounts ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.chart_of_accounts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: cheque_books; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.cheque_books (
    id integer NOT NULL,
    bank_account_id integer NOT NULL,
    branch_id integer DEFAULT 1 NOT NULL,
    first_cheque_number character(6) NOT NULL,
    last_cheque_number character(6) NOT NULL,
    cheque_count integer DEFAULT 0 NOT NULL,
    notes character varying(255),
    created_by integer,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: cheque_books_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.cheque_books ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.cheque_books_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: cheques; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.cheques (
    id integer NOT NULL,
    cheque_book_id integer NOT NULL,
    bank_account_id integer NOT NULL,
    branch_id integer DEFAULT 1 NOT NULL,
    cheque_number character(6) NOT NULL,
    status character varying(255) DEFAULT 'unused'::character varying NOT NULL,
    amount numeric(12,2),
    sale_id integer,
    payee_name character varying(255),
    issue_date date,
    cleared_date date,
    bounced_date date,
    memo character varying(500),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: cheques_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.cheques ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.cheques_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: cus_outstanding; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.cus_outstanding (
    id integer NOT NULL,
    sale_id integer NOT NULL,
    customer_id integer NOT NULL,
    amount numeric(10,2) NOT NULL,
    status character varying(255) DEFAULT 'unpaid'::character varying,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: cus_outstanding_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.cus_outstanding ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.cus_outstanding_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: cus_payments; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.cus_payments (
    id integer NOT NULL,
    store_id integer,
    customer_id integer NOT NULL,
    sale_id integer,
    balance_entry_id integer,
    amount_paid numeric(10,2) NOT NULL,
    payment_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    remarks character varying(255)
);


--
-- Name: cus_payments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.cus_payments ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.cus_payments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: customer_balance_entries; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.customer_balance_entries (
    id integer NOT NULL,
    entry_number character varying(30) NOT NULL,
    customer_id integer NOT NULL,
    store_id integer DEFAULT 1,
    entry_type character varying(255) DEFAULT 'receivable'::character varying NOT NULL,
    amount numeric(12,2) NOT NULL,
    remaining_amount numeric(12,2) NOT NULL,
    reference_no character varying(50),
    remarks character varying(255),
    map_account_id integer,
    journal_entry_id integer,
    status character varying(255) DEFAULT 'posted'::character varying NOT NULL,
    created_by integer NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: customer_balance_entries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.customer_balance_entries ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.customer_balance_entries_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: customer_categories; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.customer_categories (
    id integer NOT NULL,
    category_name character varying(100) NOT NULL,
    description text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: customer_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.customer_categories ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.customer_categories_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: customer_subscription_invoices; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.customer_subscription_invoices (
    id integer NOT NULL,
    subscription_id integer NOT NULL,
    sale_id integer NOT NULL,
    period_start date NOT NULL,
    period_end date NOT NULL,
    amount numeric(12,2) DEFAULT 0.00 NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: customer_subscription_invoices_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.customer_subscription_invoices ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.customer_subscription_invoices_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: customer_subscriptions; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.customer_subscriptions (
    id integer NOT NULL,
    store_id integer,
    customer_id integer NOT NULL,
    item_id integer NOT NULL,
    subscription_plan_id integer,
    status character varying(255) DEFAULT 'active'::character varying NOT NULL,
    start_date date NOT NULL,
    current_period_end date NOT NULL,
    next_renewal_date date,
    amount numeric(12,2) DEFAULT 0.00 NOT NULL,
    auto_renew boolean DEFAULT false NOT NULL,
    notes text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: customer_subscriptions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.customer_subscriptions ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.customer_subscriptions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: customers; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.customers (
    id integer NOT NULL,
    primary_store_id integer,
    name character varying(100) NOT NULL,
    phone character varying(20),
    email character varying(100),
    address text,
    is_walk_in boolean DEFAULT false,
    ntn character varying(20),
    province character varying(100) DEFAULT 'Punjab'::character varying,
    active boolean DEFAULT true NOT NULL,
    discount_applied character varying(255) DEFAULT 'N'::character varying,
    discount_rate numeric(5,2) DEFAULT 0.00,
    withholding_rate numeric(5,2) DEFAULT 0.00,
    category_id integer,
    customer_type character varying(255) DEFAULT 'retail'::character varying NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: customers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.customers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.customers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: deal_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.deal_items (
    id integer NOT NULL,
    deal_id integer NOT NULL,
    selection_type character varying(255) NOT NULL,
    category_id integer,
    sub_category_id integer,
    item_id integer,
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    min_selection integer DEFAULT 1,
    max_selection integer DEFAULT 1
);


--
-- Name: deal_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.deal_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.deal_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: deals; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.deals (
    id integer NOT NULL,
    item_id integer NOT NULL,
    deal_name character varying(100) NOT NULL,
    deal_price numeric(10,2) NOT NULL,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: deals_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.deals ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.deals_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: delivery_orders; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.delivery_orders (
    id integer NOT NULL,
    store_id integer,
    sale_id integer NOT NULL,
    customer_id integer NOT NULL,
    rider_id integer,
    delivery_status character varying(255) DEFAULT 'pending'::character varying,
    delivery_address text,
    delivery_time timestamp without time zone,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: delivery_orders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.delivery_orders ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.delivery_orders_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: delivery_riders; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.delivery_riders (
    id integer NOT NULL,
    assigned_store_id integer,
    name character varying(100) NOT NULL,
    phone character varying(20),
    email character varying(100),
    vehicle_number character varying(50),
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: delivery_riders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.delivery_riders ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.delivery_riders_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: dinein_floors; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.dinein_floors (
    id integer NOT NULL,
    store_id integer,
    name character varying(100) NOT NULL,
    description text,
    is_active boolean DEFAULT true
);


--
-- Name: dinein_floors_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.dinein_floors ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.dinein_floors_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: dinein_tables; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.dinein_tables (
    id integer NOT NULL,
    store_id integer,
    floor_id integer NOT NULL,
    table_name character varying(50) NOT NULL,
    seats integer DEFAULT 4,
    status character varying(255) DEFAULT 'available'::character varying,
    is_active boolean DEFAULT true
);


--
-- Name: dinein_tables_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.dinein_tables ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.dinein_tables_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: discount_categories; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.discount_categories (
    id integer NOT NULL,
    category_name character varying(100) NOT NULL,
    display_order integer DEFAULT 0,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: discount_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.discount_categories ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.discount_categories_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: discounts; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.discounts (
    id integer NOT NULL,
    discount_name character varying(100) NOT NULL,
    discount_code character varying(20),
    discount_type character varying(255) NOT NULL,
    discount_rate numeric(10,2) NOT NULL,
    discount_cap numeric(10,2),
    category_id integer,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: discounts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.discounts ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.discounts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: expense_accounts; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.expense_accounts (
    id integer NOT NULL,
    category_id integer NOT NULL,
    subcategory_id integer NOT NULL,
    name character varying(100) NOT NULL,
    chart_of_account_id integer,
    mapped_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    mapped_by integer
);


--
-- Name: expense_accounts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.expense_accounts ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.expense_accounts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: expense_categories; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.expense_categories (
    id integer NOT NULL,
    name character varying(100) NOT NULL
);


--
-- Name: expense_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.expense_categories ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.expense_categories_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: expense_subcategories; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.expense_subcategories (
    id integer NOT NULL,
    category_id integer NOT NULL,
    name character varying(100) NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: expense_subcategories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.expense_subcategories ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.expense_subcategories_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: expenses; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.expenses (
    id integer NOT NULL,
    store_id integer,
    branch_id integer,
    shift_id integer,
    expense_payment_group_id character varying(36),
    account_id integer NOT NULL,
    remarks text,
    amount numeric(10,2) NOT NULL,
    expense_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    payment_method character varying(255) DEFAULT 'cash'::character varying,
    bank_account_id integer,
    journal_entry_id integer,
    status character varying(255) DEFAULT 'approved'::character varying,
    approved_by integer,
    approved_at timestamp without time zone,
    reversal_date date,
    reversal_reason text,
    reversal_journal_id integer,
    rejection_reason text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: expenses_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.expenses ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.expenses_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: fbr_config; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.fbr_config (
    id integer NOT NULL,
    is_enabled boolean,
    display_name character varying(255) DEFAULT 'FBR'::character varying NOT NULL,
    api_url character varying(255),
    pos_id bigint,
    usin character varying(50)
);


--
-- Name: fbr_config_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.fbr_config ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.fbr_config_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: fbr_digital; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.fbr_digital (
    id integer NOT NULL,
    is_enabled boolean DEFAULT false,
    api_url character varying(255),
    token text,
    mode character varying(255) DEFAULT 'sandbox'::character varying,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: fbr_digital_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.fbr_digital ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.fbr_digital_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: fbr_invoices; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.fbr_invoices (
    id integer NOT NULL,
    sale_id integer NOT NULL,
    fbr_invoice_number character varying(100) NOT NULL,
    qr_code text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: fbr_invoices_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.fbr_invoices ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.fbr_invoices_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: fbr_logs; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.fbr_logs (
    id integer NOT NULL,
    sale_id integer,
    response text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: fbr_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.fbr_logs ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.fbr_logs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: fiscal_period_setup; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.fiscal_period_setup (
    start_year character varying(50) NOT NULL,
    start_month integer,
    start_day integer,
    month_count integer,
    open_year integer
);


--
-- Name: fiscal_periods; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.fiscal_periods (
    id integer NOT NULL,
    period_code character varying(50),
    period_name character varying(50) NOT NULL,
    period_year integer,
    start_date date NOT NULL,
    end_date date NOT NULL,
    is_closed boolean DEFAULT false,
    period_status character varying(50) DEFAULT 'Open'::character varying,
    closed_by integer,
    closed_at timestamp without time zone,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: fiscal_periods_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.fiscal_periods ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.fiscal_periods_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: hold_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.hold_items (
    id integer NOT NULL,
    store_id integer,
    hold_id integer,
    item_id integer,
    item_name character varying(100),
    quantity numeric(12,3),
    unit_price numeric(10,2),
    original_unit_price numeric(10,2),
    discount_type character varying(255) DEFAULT 'none'::character varying NOT NULL,
    discount_value numeric(10,2) DEFAULT 0.00 NOT NULL,
    discount_per_unit numeric(10,2) DEFAULT 0.00 NOT NULL,
    discount_amount numeric(10,2) DEFAULT 0.00 NOT NULL,
    tax_rate numeric(5,2),
    modifiers text,
    remarks text,
    void_status character varying(255) DEFAULT 'active'::character varying NOT NULL,
    template_id integer,
    is_deal boolean DEFAULT false,
    deal_selections text,
    serial_ids text
);


--
-- Name: hold_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.hold_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.hold_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: hold_orders; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.hold_orders (
    id integer NOT NULL,
    token_number integer,
    shift_id integer,
    store_id integer,
    customer_name character varying(100),
    customer_id integer,
    table_id integer,
    order_mode character varying(50),
    rider_id integer,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    total_amount numeric(10,2) DEFAULT 0.00,
    discount_id integer,
    discount_type character varying(255) DEFAULT 'none'::character varying,
    discount_value numeric(10,2) DEFAULT 0.00,
    discount_amount numeric(10,2) DEFAULT 0.00,
    order_taker_id integer,
    number_of_guests integer,
    reserved_invoice_number character varying(20)
);


--
-- Name: hold_orders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.hold_orders ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.hold_orders_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: inventory_movements; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.inventory_movements (
    id integer NOT NULL,
    item_id integer NOT NULL,
    store_id integer,
    branch_id integer DEFAULT 1 NOT NULL,
    movement_type character varying(255) NOT NULL,
    reference_type character varying(255) DEFAULT 'manual'::character varying,
    reference_id integer,
    quantity numeric(12,6) NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: inventory_movements_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.inventory_movements ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.inventory_movements_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: item_barcodes; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.item_barcodes (
    id integer NOT NULL,
    item_id integer NOT NULL,
    barcode character varying(100) NOT NULL,
    barcode_label character varying(100),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);


--
-- Name: item_barcodes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.item_barcodes ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.item_barcodes_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: item_line_discounts; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.item_line_discounts (
    id integer NOT NULL,
    item_id integer NOT NULL,
    discount_type character varying(255) NOT NULL,
    discount_value numeric(10,2) DEFAULT 0.00 NOT NULL,
    is_active boolean DEFAULT true NOT NULL,
    starts_at date,
    expires_at date,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);


--
-- Name: item_line_discounts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.item_line_discounts ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.item_line_discounts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: item_modifier_group_assignments; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.item_modifier_group_assignments (
    id integer NOT NULL,
    item_id integer NOT NULL,
    modifier_group_id integer NOT NULL,
    is_required boolean DEFAULT false,
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: item_modifier_group_assignments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.item_modifier_group_assignments ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.item_modifier_group_assignments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: item_modifier_groups; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.item_modifier_groups (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    display_name character varying(100) NOT NULL,
    description text,
    is_required boolean DEFAULT false,
    is_multiple_choice boolean DEFAULT false,
    max_selections integer,
    min_selections integer DEFAULT 1,
    is_active boolean DEFAULT true,
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: item_modifier_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.item_modifier_groups ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.item_modifier_groups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: item_modifiers; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.item_modifiers (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    short_name character varying(50),
    price_adjustment numeric(10,2) DEFAULT 0.00,
    cost_adjustment numeric(10,2) DEFAULT 0.00,
    is_default boolean DEFAULT false,
    is_active boolean DEFAULT true,
    sort_order integer DEFAULT 0,
    prep_time_adjustment integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: item_modifiers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.item_modifiers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.item_modifiers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: item_serial_transactions; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.item_serial_transactions (
    id bigint NOT NULL,
    serial_id bigint NOT NULL,
    item_id integer NOT NULL,
    trans_type character varying(3) NOT NULL,
    doc_type character varying(20) NOT NULL,
    doc_id bigint NOT NULL,
    header_id bigint,
    branch_id integer,
    user_id integer,
    remarks character varying(500),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);


--
-- Name: item_serial_transactions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.item_serial_transactions ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.item_serial_transactions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: item_serials; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.item_serials (
    id bigint NOT NULL,
    item_id integer NOT NULL,
    serial_no character varying(191) NOT NULL,
    details text,
    cost_price numeric(10,2),
    selling_price numeric(10,2),
    warranty_name character varying(255),
    warranty_expiry date,
    status_code character varying(3) DEFAULT 'SIN'::character varying NOT NULL,
    branch_id integer,
    supplier_id integer,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);


--
-- Name: item_serials_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.item_serials ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.item_serials_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.items (
    id integer NOT NULL,
    item_code character varying(50) NOT NULL,
    sku_number character varying(100) NOT NULL,
    name character varying(100) NOT NULL,
    description text,
    retail_price numeric(10,2) NOT NULL,
    wholesale_price numeric(10,2),
    cost_price numeric(10,2) NOT NULL,
    reorder_quantity integer DEFAULT 0,
    reorder_level integer DEFAULT 0,
    tax_type character varying(255) NOT NULL,
    tax_rate_id integer,
    category_id integer,
    sub_category_id integer,
    bulk_qty integer,
    bulk_price numeric(10,2),
    pkg_qty integer,
    uom_id integer NOT NULL,
    item_type character varying(255) DEFAULT 'loose'::character varying NOT NULL,
    product_image character varying(255),
    display_color character varying(50),
    item_role character varying(255) DEFAULT 'stock'::character varying NOT NULL,
    is_serialized boolean DEFAULT false NOT NULL,
    is_third_schedule boolean DEFAULT false NOT NULL,
    is_active boolean DEFAULT true NOT NULL,
    supplier_id integer,
    prep_time integer
);


--
-- Name: items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: journal_entries; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.journal_entries (
    id integer NOT NULL,
    entry_number character varying(20) NOT NULL,
    entry_date date NOT NULL,
    period_id integer,
    transaction_date date NOT NULL,
    source_type character varying(255) NOT NULL,
    reference_id integer,
    description text,
    total_debit numeric(15,2) DEFAULT 0.00,
    total_credit numeric(15,2) DEFAULT 0.00,
    status character varying(255) DEFAULT 'draft'::character varying,
    store_id integer DEFAULT 1,
    branch_id integer DEFAULT 1 NOT NULL,
    user_id integer NOT NULL,
    posted_at timestamp without time zone,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: journal_entries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.journal_entries ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.journal_entries_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: journal_entry_lines; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.journal_entry_lines (
    id integer NOT NULL,
    journal_entry_id integer NOT NULL,
    account_id integer NOT NULL,
    debit_amount numeric(15,2) DEFAULT 0.00,
    credit_amount numeric(15,2) DEFAULT 0.00,
    description text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: journal_entry_lines_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.journal_entry_lines ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.journal_entry_lines_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: kds_activity_log; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.kds_activity_log (
    id integer NOT NULL,
    store_id integer,
    kds_order_id integer,
    kds_order_item_id integer,
    action character varying(50) NOT NULL,
    details text,
    description text,
    user_id integer,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: kds_activity_log_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.kds_activity_log ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.kds_activity_log_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: kds_cleanup_log; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.kds_cleanup_log (
    id integer NOT NULL,
    cleanup_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    retention_days integer DEFAULT 7,
    orders_deleted integer DEFAULT 0,
    order_items_deleted integer DEFAULT 0,
    activity_logs_deleted integer DEFAULT 0,
    total_records_deleted integer DEFAULT 0,
    execution_time_ms integer DEFAULT 0,
    status character varying(255) DEFAULT 'success'::character varying,
    message text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: kds_cleanup_log_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.kds_cleanup_log ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.kds_cleanup_log_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: kds_order_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.kds_order_items (
    id integer NOT NULL,
    store_id integer,
    kds_order_id integer NOT NULL,
    sale_item_id integer NOT NULL,
    hold_item_id integer,
    item_id integer NOT NULL,
    item_name character varying(100) NOT NULL,
    quantity numeric(12,3) NOT NULL,
    unit_price numeric(10,2) NOT NULL,
    total_price numeric(10,2) NOT NULL,
    item_status character varying(255) DEFAULT 'pending'::character varying NOT NULL,
    special_instructions text,
    preparation_notes text,
    prepared_at timestamp without time zone,
    served_at timestamp without time zone,
    prepared_by integer,
    served_by integer,
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    item_status_type character varying(255) DEFAULT 'original'::character varying,
    served_quantity numeric(12,3) DEFAULT 0.000,
    total_quantity numeric(12,3) DEFAULT 0.000
);


--
-- Name: kds_order_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.kds_order_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.kds_order_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: kds_orders; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.kds_orders (
    id integer NOT NULL,
    store_id integer,
    sale_id integer NOT NULL,
    hold_id integer,
    invoice_number character varying(50) NOT NULL,
    order_number character varying(50) NOT NULL,
    table_number character varying(20),
    customer_name character varying(100),
    order_type character varying(255) DEFAULT 'dine_in'::character varying NOT NULL,
    order_status character varying(255) DEFAULT 'pending'::character varying NOT NULL,
    priority character varying(255) DEFAULT 'normal'::character varying NOT NULL,
    estimated_time integer,
    notes text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    prepared_at timestamp without time zone,
    served_at timestamp without time zone,
    created_by integer,
    prepared_by integer,
    served_by integer,
    order_taker_id integer,
    order_sequence integer DEFAULT 1,
    parent_order_id integer
);


--
-- Name: kds_orders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.kds_orders ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.kds_orders_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: kds_settings; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.kds_settings (
    id integer NOT NULL,
    store_id integer,
    setting_key character varying(100) NOT NULL,
    setting_value text,
    description text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: kds_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.kds_settings ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.kds_settings_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: kds_station_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.kds_station_items (
    id integer NOT NULL,
    store_id integer,
    station_id integer NOT NULL,
    item_id integer NOT NULL,
    preparation_time integer,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: kds_station_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.kds_station_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.kds_station_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: kds_stations; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.kds_stations (
    id integer NOT NULL,
    store_id integer,
    name character varying(100) NOT NULL,
    description text,
    printer_id integer,
    enable_kot_print boolean DEFAULT true,
    color character varying(7) DEFAULT '#007bff'::character varying,
    is_active boolean DEFAULT true,
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    preparation_time integer DEFAULT 10
);


--
-- Name: kds_stations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.kds_stations ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.kds_stations_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: kpra_config; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.kpra_config (
    id integer NOT NULL,
    is_enabled boolean DEFAULT false,
    key character varying(255),
    pos_id character varying(100),
    business_id character varying(50),
    api_url character varying(255) DEFAULT 'http://kpra.gov.pk/rims/integration/'::character varying,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: kpra_config_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.kpra_config ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.kpra_config_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: kpra_invoices; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.kpra_invoices (
    id integer NOT NULL,
    sale_id integer NOT NULL,
    kpra_invoice_number character varying(100) NOT NULL,
    qr_code_url text,
    qr_code_image text,
    response_status character varying(10),
    response_message text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: kpra_invoices_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.kpra_invoices ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.kpra_invoices_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: kpra_logs; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.kpra_logs (
    id integer NOT NULL,
    sale_id integer,
    request_data text,
    response_data text,
    status_code character varying(10),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: kpra_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.kpra_logs ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.kpra_logs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: languages; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.languages (
    id integer NOT NULL,
    code character varying(5) NOT NULL,
    name character varying(50) NOT NULL,
    native_name character varying(50) NOT NULL,
    flag character varying(100),
    rtl boolean DEFAULT false,
    active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: languages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.languages ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.languages_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: modifier_group_assignments; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.modifier_group_assignments (
    id integer NOT NULL,
    modifier_id integer NOT NULL,
    modifier_group_id integer NOT NULL,
    is_required boolean DEFAULT false,
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: modifier_group_assignments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.modifier_group_assignments ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.modifier_group_assignments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: modifier_template_options; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.modifier_template_options (
    id integer NOT NULL,
    template_id integer NOT NULL,
    name character varying(100) NOT NULL,
    price_adjustment numeric(10,2) DEFAULT 0.00,
    is_active boolean DEFAULT true,
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: modifier_template_options_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.modifier_template_options ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.modifier_template_options_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: modifier_templates; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.modifier_templates (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    icon character varying(50) DEFAULT 'layers'::character varying,
    is_active boolean DEFAULT true,
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: modifier_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.modifier_templates ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.modifier_templates_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: order_takers; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.order_takers (
    id integer NOT NULL,
    assigned_store_id integer,
    name character varying(100) NOT NULL,
    employee_id character varying(50),
    phone character varying(20),
    email character varying(100),
    commission_rate numeric(5,2) DEFAULT 0.00,
    password character varying(255) NOT NULL,
    user_id integer,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: order_takers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.order_takers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.order_takers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payment_method_tax_rates; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.payment_method_tax_rates (
    id integer NOT NULL,
    payment_method character varying(50) NOT NULL,
    tax_rate numeric(5,2) DEFAULT 0.00 NOT NULL,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: payment_method_tax_rates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.payment_method_tax_rates ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payment_method_tax_rates_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: payment_methods; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.payment_methods (
    id integer NOT NULL,
    method_name character varying(50) NOT NULL,
    display_name character varying(100),
    icon_class character varying(50),
    color_class character varying(50),
    is_active boolean DEFAULT true,
    requires_bank_account boolean DEFAULT false,
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: payment_methods_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.payment_methods ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.payment_methods_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: price_history; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.price_history (
    id integer NOT NULL,
    item_id integer NOT NULL,
    item_name character varying(100) NOT NULL,
    vendor_id integer,
    old_cost_price numeric(10,2),
    new_cost_price numeric(10,2),
    old_retail_price numeric(10,2),
    new_retail_price numeric(10,2),
    changed_by character varying(100),
    changed_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: price_history_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.price_history ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.price_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: print_devices; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.print_devices (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    connection_type character varying(255) NOT NULL,
    print_type character varying(255) DEFAULT 'all'::character varying,
    terminal_id integer,
    printer_name character varying(100),
    printer_type character varying(255) DEFAULT 'thermal'::character varying,
    print_mode character varying(255) DEFAULT 'auto'::character varying,
    copies integer DEFAULT 1 NOT NULL,
    ip_address character varying(100),
    is_active boolean DEFAULT true,
    is_default boolean DEFAULT false,
    auto_detect boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: print_devices_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.print_devices ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.print_devices_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: production_cost_lines; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.production_cost_lines (
    id integer NOT NULL,
    production_item_id integer NOT NULL,
    cost_type character varying(255) DEFAULT 'other'::character varying NOT NULL,
    description character varying(255),
    quantity numeric(12,4),
    unit_rate numeric(12,4),
    amount numeric(12,2) DEFAULT 0.00 NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: production_cost_lines_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.production_cost_lines ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.production_cost_lines_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: production_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.production_items (
    id integer NOT NULL,
    production_order_id integer NOT NULL,
    material_store_id integer,
    finish_store_id integer,
    item_id integer NOT NULL,
    quantity numeric(10,2) NOT NULL,
    unit_cost numeric(10,2) DEFAULT 0.00,
    total_cost numeric(10,2) DEFAULT 0.00,
    status character varying(255) DEFAULT 'pending'::character varying NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: production_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.production_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.production_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: production_materials; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.production_materials (
    id integer NOT NULL,
    production_item_id integer NOT NULL,
    material_item_id integer NOT NULL,
    quantity_consumed numeric(10,2) NOT NULL,
    unit_cost numeric(10,2) DEFAULT 0.00,
    total_cost numeric(10,2) DEFAULT 0.00,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: production_materials_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.production_materials ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.production_materials_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: production_orders; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.production_orders (
    id integer NOT NULL,
    order_number character varying(50) NOT NULL,
    production_date date NOT NULL,
    status character varying(255) DEFAULT 'pending'::character varying NOT NULL,
    remarks text,
    total_cost numeric(10,2) DEFAULT 0.00,
    created_by integer NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: production_orders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.production_orders ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.production_orders_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: purchase_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.purchase_items (
    id integer NOT NULL,
    store_id integer,
    purchase_id integer NOT NULL,
    item_id integer NOT NULL,
    item_name character varying(100) NOT NULL,
    quantity numeric(12,3) NOT NULL,
    unit_cost numeric(10,2) NOT NULL,
    total_cost numeric(10,2) NOT NULL,
    tax_rate numeric(5,2) DEFAULT 0.00
);


--
-- Name: purchase_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.purchase_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.purchase_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: purchase_order_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.purchase_order_items (
    id integer NOT NULL,
    purchase_order_id integer NOT NULL,
    item_id integer NOT NULL,
    item_name character varying(100) NOT NULL,
    quantity numeric(12,3) NOT NULL,
    quantity_loose numeric(12,3) DEFAULT 0.000 NOT NULL,
    unit_cost numeric(10,2) NOT NULL,
    retail_price numeric(10,2) DEFAULT 0.00 NOT NULL,
    total_cost numeric(10,2) NOT NULL,
    tax_rate numeric(5,2) DEFAULT 0.00,
    purchase_mode character varying(10) DEFAULT 'loose'::character varying NOT NULL,
    bulk_base_qty numeric(12,3) DEFAULT 0.000 NOT NULL
);


--
-- Name: purchase_order_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.purchase_order_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.purchase_order_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: purchase_orders; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.purchase_orders (
    id integer NOT NULL,
    po_number character varying(50) NOT NULL,
    vendor_id integer NOT NULL,
    store_id integer,
    branch_id integer DEFAULT 1 NOT NULL,
    po_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    total_amount numeric(10,2) DEFAULT 0.00 NOT NULL,
    tax_amount numeric(10,2) DEFAULT 0.00 NOT NULL,
    discount_amount numeric(10,2) DEFAULT 0.00 NOT NULL,
    net_amount numeric(10,2) DEFAULT 0.00 NOT NULL,
    notes text,
    status character varying(20) DEFAULT 'pending'::character varying NOT NULL,
    converted_purchase_id integer,
    converted_at timestamp without time zone,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: purchase_orders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.purchase_orders ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.purchase_orders_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: purchase_return_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.purchase_return_items (
    id integer NOT NULL,
    purchase_return_id integer NOT NULL,
    item_id integer NOT NULL,
    quantity numeric(12,3) NOT NULL,
    unit_cost numeric(10,2) NOT NULL,
    total_cost numeric(10,2) NOT NULL,
    tax_rate numeric(5,2) DEFAULT 0.00
);


--
-- Name: purchase_return_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.purchase_return_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.purchase_return_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: purchase_returns; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.purchase_returns (
    id integer NOT NULL,
    store_id integer,
    purchase_id integer,
    vendor_id integer NOT NULL,
    return_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    total_amount numeric(10,2) NOT NULL,
    remarks character varying(255),
    customer_remarks character varying(255),
    created_by integer,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: purchase_returns_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.purchase_returns ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.purchase_returns_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: purchases; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.purchases (
    id integer NOT NULL,
    store_id integer,
    branch_id integer DEFAULT 1 NOT NULL,
    purchase_number character varying(50) NOT NULL,
    vendor_id integer NOT NULL,
    purchase_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    total_amount numeric(10,2) NOT NULL,
    tax_amount numeric(10,2) DEFAULT 0.00,
    discount_amount numeric(10,2) DEFAULT 0.00,
    net_amount numeric(10,2) NOT NULL,
    payment_method character varying(255) DEFAULT 'cash'::character varying,
    status character varying(20) DEFAULT 'pending'::character varying,
    source_po_id integer,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: purchases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.purchases ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.purchases_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: quotation_drafts; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.quotation_drafts (
    id integer NOT NULL,
    user_id integer NOT NULL,
    store_id integer NOT NULL,
    payload text NOT NULL,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: quotation_drafts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.quotation_drafts ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.quotation_drafts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: quotation_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.quotation_items (
    id integer NOT NULL,
    quotation_id integer NOT NULL,
    item_id integer NOT NULL,
    item_name character varying(100) NOT NULL,
    quantity numeric(12,3) NOT NULL,
    unit_price numeric(10,2) NOT NULL,
    total_price numeric(10,2) NOT NULL,
    tax_rate numeric(5,2) DEFAULT 0.00,
    line_discount_percent numeric(5,2) DEFAULT 0.00 NOT NULL,
    remarks text
);


--
-- Name: quotation_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.quotation_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.quotation_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: quotations; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.quotations (
    id integer NOT NULL,
    store_id integer,
    quotation_number character varying(50) NOT NULL,
    customer_id integer,
    customer_name character varying(100),
    quotation_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    subtotal numeric(10,2) DEFAULT 0.00 NOT NULL,
    tax_amount numeric(10,2) DEFAULT 0.00,
    discount_amount numeric(10,2) DEFAULT 0.00,
    net_amount numeric(10,2) DEFAULT 0.00 NOT NULL,
    status character varying(255) DEFAULT 'draft'::character varying,
    remarks text,
    created_by integer,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: quotations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.quotations ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.quotations_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: rights; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.rights (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    description text,
    category character varying(100)
);


--
-- Name: rights_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.rights ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.rights_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: role_rights; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.role_rights (
    role_id integer NOT NULL,
    right_id integer NOT NULL
);


--
-- Name: roles; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.roles (
    id integer NOT NULL,
    name character varying(100) NOT NULL
);


--
-- Name: roles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.roles ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.roles_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: sale_item_modifiers; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_item_modifiers (
    id integer NOT NULL,
    sale_item_id integer NOT NULL,
    modifier_id integer NOT NULL,
    modifier_group_id integer NOT NULL,
    modifier_name character varying(100) NOT NULL,
    price_adjustment numeric(10,2) DEFAULT 0.00,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: sale_item_modifiers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.sale_item_modifiers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.sale_item_modifiers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: sale_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_items (
    id integer NOT NULL,
    store_id integer,
    sale_id integer NOT NULL,
    item_id integer NOT NULL,
    item_name character varying(100) NOT NULL,
    quantity numeric(12,3) NOT NULL,
    unit_price numeric(10,2) NOT NULL,
    original_unit_price numeric(10,2),
    total_price numeric(10,2) NOT NULL,
    discount_type character varying(255) DEFAULT 'none'::character varying NOT NULL,
    discount_value numeric(10,2) DEFAULT 0.00 NOT NULL,
    discount_per_unit numeric(10,2) DEFAULT 0.00 NOT NULL,
    discount_amount numeric(10,2) DEFAULT 0.00 NOT NULL,
    tax_rate numeric(5,2) DEFAULT 0.00,
    remarks text,
    is_deal boolean DEFAULT false,
    deal_selections text
);


--
-- Name: sale_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.sale_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.sale_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: sale_return_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_return_items (
    id integer NOT NULL,
    sale_return_id integer NOT NULL,
    item_id integer NOT NULL,
    quantity numeric(12,3) NOT NULL,
    unit_price numeric(10,2) NOT NULL,
    total_price numeric(10,2) NOT NULL,
    tax_rate numeric(5,2) DEFAULT 0.00
);


--
-- Name: sale_return_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.sale_return_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.sale_return_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: sale_returns; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sale_returns (
    id integer NOT NULL,
    store_id integer,
    sale_id integer,
    return_source character varying(20) DEFAULT 'invoice'::character varying NOT NULL,
    customer_id integer NOT NULL,
    return_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    total_amount numeric(10,2) NOT NULL,
    remarks character varying(255),
    customer_remarks character varying(255),
    payment_method character varying(255) DEFAULT 'cash'::character varying,
    bank_account_id integer,
    created_by integer,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: sale_returns_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.sale_returns ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.sale_returns_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: sales; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sales (
    id integer NOT NULL,
    terminal_id integer,
    store_id integer,
    branch_id integer DEFAULT 1 NOT NULL,
    invoice_number character varying(50) NOT NULL,
    sale_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    customer_name character varying(100),
    customer_id integer,
    total_amount numeric(10,2) NOT NULL,
    tax_amount numeric(10,2) DEFAULT 0.00,
    discount_amount numeric(10,2) DEFAULT 0.00,
    withholding_amount numeric(10,2) DEFAULT 0.00,
    discount_id integer,
    net_amount numeric(10,2) NOT NULL,
    payment_method character varying(50) DEFAULT 'cash'::character varying,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    shift_id integer,
    is_fbr_enabled boolean DEFAULT false,
    is_kpra_enabled boolean DEFAULT false,
    zatca_phase2_invoice_id bigint,
    table_id integer,
    order_mode character varying(50),
    discount_type character varying(255),
    discount_value numeric(10,2) DEFAULT 0.00,
    service_charges numeric(10,2) DEFAULT 0.00,
    tip_amount numeric(10,2) DEFAULT 0.00,
    order_taker_id integer,
    number_of_guests integer,
    void_id integer
);


--
-- Name: sales_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.sales ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.sales_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: setting_categories; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.setting_categories (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    code character varying(50) NOT NULL
);


--
-- Name: setting_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.setting_categories ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.setting_categories_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: setting_options; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.setting_options (
    id integer NOT NULL,
    setting_id integer NOT NULL,
    option_label character varying(100),
    option_value character varying(100)
);


--
-- Name: setting_options_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.setting_options ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.setting_options_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: settings; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.settings (
    id integer NOT NULL,
    store_id integer,
    category_id integer NOT NULL,
    name character varying(100) NOT NULL,
    code character varying(100) NOT NULL,
    type character varying(255),
    value text,
    default_value text,
    description text,
    is_active boolean DEFAULT true
);


--
-- Name: settings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.settings ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.settings_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: shift_logs; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.shift_logs (
    id integer NOT NULL,
    store_id integer,
    shift_id integer NOT NULL,
    action_type character varying(255) NOT NULL,
    amount numeric(10,2) DEFAULT 0.00,
    note text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: shift_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.shift_logs ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.shift_logs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: shifts; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.shifts (
    id integer NOT NULL,
    store_id integer,
    branch_id integer DEFAULT 1 NOT NULL,
    user_id integer NOT NULL,
    start_time timestamp without time zone NOT NULL,
    end_time timestamp without time zone,
    opening_cash numeric(10,2) DEFAULT 0.00,
    closing_cash numeric(10,2) DEFAULT 0.00,
    expected_cash numeric(10,2) DEFAULT 0.00,
    actual_cash numeric(10,2) DEFAULT 0.00,
    discrepancy numeric(10,2) DEFAULT 0.00,
    status character varying(255) DEFAULT 'open'::character varying
);


--
-- Name: shifts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.shifts ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.shifts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: stock_adjustment_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.stock_adjustment_items (
    id integer NOT NULL,
    adjustment_id integer NOT NULL,
    item_id integer NOT NULL,
    item_name character varying(100) NOT NULL,
    current_quantity numeric(12,6) NOT NULL,
    adjustment_quantity numeric(12,6) NOT NULL,
    new_quantity numeric(12,6) NOT NULL,
    cost_price numeric(10,2) NOT NULL,
    current_stock_value numeric(12,2) NOT NULL,
    adjustment_value numeric(12,2) NOT NULL,
    new_stock_value numeric(12,2) NOT NULL
);


--
-- Name: stock_adjustment_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.stock_adjustment_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.stock_adjustment_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: stock_adjustments; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.stock_adjustments (
    id integer NOT NULL,
    adjustment_number character varying(50) NOT NULL,
    store_id integer NOT NULL,
    adjustment_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    total_items integer DEFAULT 0,
    total_adjustment_value numeric(12,2) DEFAULT 0.00,
    total_current_stock_value numeric(12,2) DEFAULT 0.00,
    total_new_stock_value numeric(12,2) DEFAULT 0.00,
    remarks text,
    created_by integer NOT NULL,
    journal_entry_id integer,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: stock_adjustments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.stock_adjustments ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.stock_adjustments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: stock_transfer_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.stock_transfer_items (
    id integer NOT NULL,
    to_store_id integer,
    from_store_id integer,
    transfer_id integer NOT NULL,
    item_id integer NOT NULL,
    item_name character varying(100) NOT NULL,
    quantity numeric(12,6) NOT NULL,
    cost_price numeric(10,2),
    remarks text
);


--
-- Name: stock_transfer_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.stock_transfer_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.stock_transfer_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: stock_transfers; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.stock_transfers (
    id integer NOT NULL,
    transfer_number character varying(50) NOT NULL,
    from_store_id integer NOT NULL,
    to_store_id integer NOT NULL,
    transfer_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    status character varying(255) DEFAULT 'pending'::character varying,
    total_items integer DEFAULT 0,
    total_quantity numeric(12,6) DEFAULT 0.000000,
    notes text,
    requested_by integer,
    approved_by integer,
    received_by integer,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: stock_transfers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.stock_transfers ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.stock_transfers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: store_inventory; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.store_inventory (
    id integer NOT NULL,
    store_id integer NOT NULL,
    item_id integer NOT NULL,
    quantity numeric(12,6) DEFAULT 0.000000,
    last_updated timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: store_inventory_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.store_inventory ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.store_inventory_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: stores; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.stores (
    id integer NOT NULL,
    branch_id integer DEFAULT 1 NOT NULL,
    store_name character varying(100) NOT NULL,
    store_code character varying(20) NOT NULL,
    address text,
    phone character varying(20),
    email character varying(100),
    manager_name character varying(100),
    is_active boolean DEFAULT true,
    is_default boolean DEFAULT false,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: stores_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.stores ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.stores_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: sub_categories; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sub_categories (
    id integer NOT NULL,
    category_id integer NOT NULL,
    name character varying(100) NOT NULL,
    display_color character varying(50)
);


--
-- Name: sub_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.sub_categories ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.sub_categories_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: subscription_plans; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.subscription_plans (
    id integer NOT NULL,
    store_id integer,
    name character varying(100) NOT NULL,
    billing_interval character varying(255) NOT NULL,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: subscription_plans_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.subscription_plans ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.subscription_plans_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: sup_outstanding; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sup_outstanding (
    id integer NOT NULL,
    purchase_id integer,
    vendor_id integer NOT NULL,
    amount numeric(10,2) NOT NULL,
    status character varying(255) DEFAULT 'unpaid'::character varying,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: sup_outstanding_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.sup_outstanding ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.sup_outstanding_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: sup_payments; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sup_payments (
    id integer NOT NULL,
    store_id integer,
    vendor_id integer NOT NULL,
    purchase_id integer,
    balance_entry_id integer,
    amount_paid numeric(10,2) NOT NULL,
    discount_amount numeric(10,2) DEFAULT 0.00,
    withholding_rate numeric(5,2) DEFAULT 0.00,
    withholding_amount numeric(10,2) DEFAULT 0.00,
    gross_settlement_amount numeric(10,2) DEFAULT 0.00,
    net_cash_paid numeric(10,2) DEFAULT 0.00,
    payment_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    remarks character varying(255)
);


--
-- Name: sup_payments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.sup_payments ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.sup_payments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: supplier_balance_entries; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.supplier_balance_entries (
    id integer NOT NULL,
    entry_number character varying(30) NOT NULL,
    vendor_id integer NOT NULL,
    store_id integer DEFAULT 1,
    entry_type character varying(255) DEFAULT 'payable'::character varying NOT NULL,
    amount numeric(12,2) NOT NULL,
    remaining_amount numeric(12,2) NOT NULL,
    reference_no character varying(50),
    remarks character varying(255),
    map_account_id integer,
    journal_entry_id integer,
    status character varying(255) DEFAULT 'posted'::character varying NOT NULL,
    created_by integer NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: supplier_balance_entries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.supplier_balance_entries ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.supplier_balance_entries_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: sync_settings; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.sync_settings (
    id integer NOT NULL,
    sync_allow boolean DEFAULT false,
    db_prefix character varying(50),
    sync_mode character varying(255) DEFAULT 'HO'::character varying,
    server_name character varying(100),
    database_name character varying(100),
    username character varying(100),
    password character varying(255),
    last_sync_date timestamp without time zone,
    sync_status character varying(255) DEFAULT 'pending'::character varying,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: sync_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.sync_settings ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.sync_settings_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: table_transfer_logs; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.table_transfer_logs (
    id integer NOT NULL,
    source_table_id integer,
    target_table_id integer,
    hold_order_id integer,
    transferred_by integer,
    transfer_type character varying(255) DEFAULT 'transfer'::character varying NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: table_transfer_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.table_transfer_logs ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.table_transfer_logs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: tax_rates; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.tax_rates (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    rate numeric(5,2) NOT NULL
);


--
-- Name: tax_rates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.tax_rates ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.tax_rates_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: terminals; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.terminals (
    id integer NOT NULL,
    terminal_name character varying(100) NOT NULL,
    computer_name character varying(100),
    ip_address character varying(50),
    terminal_type character varying(50) DEFAULT 'POS'::character varying,
    branch_id integer,
    store_id integer,
    description text,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp without time zone
);


--
-- Name: terminals_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.terminals ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.terminals_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: translations; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.translations (
    id integer NOT NULL,
    language_code character varying(5) NOT NULL,
    key character varying(255) NOT NULL,
    value text NOT NULL,
    context character varying(100),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: translations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.translations ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.translations_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: uom_groups; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.uom_groups (
    id integer NOT NULL,
    code character varying(10) NOT NULL,
    name character varying(50) NOT NULL
);


--
-- Name: uom_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.uom_groups ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.uom_groups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: uoms; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.uoms (
    id integer NOT NULL,
    name character varying(50) NOT NULL,
    symbol character varying(10) NOT NULL,
    group_id integer NOT NULL,
    base_quantity numeric(10,4) DEFAULT 1.0000,
    is_base boolean DEFAULT false
);


--
-- Name: uoms_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.uoms ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.uoms_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: user_language_preferences; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.user_language_preferences (
    id integer NOT NULL,
    user_id integer NOT NULL,
    language_code character varying(5) NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: user_language_preferences_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.user_language_preferences ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.user_language_preferences_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: users; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.users (
    id integer NOT NULL,
    assigned_store_id integer,
    default_branch_id integer DEFAULT 1 NOT NULL,
    username character varying(100) NOT NULL,
    email character varying(100),
    password character varying(255),
    role_id integer,
    is_active boolean DEFAULT true,
    last_login timestamp without time zone,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    pin character varying(10),
    profile_picture character varying(255),
    pin_required_for_void boolean DEFAULT true,
    pin_login_enabled boolean DEFAULT false NOT NULL,
    cash_access boolean DEFAULT true NOT NULL
);


--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.users ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.users_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: vendors; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.vendors (
    id integer NOT NULL,
    primary_store_id integer,
    name character varying(100) NOT NULL,
    contact_number character varying(20),
    email character varying(100),
    address text,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: vendors_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.vendors ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.vendors_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: video_help; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.video_help (
    id integer NOT NULL,
    page_name character varying(100) NOT NULL,
    page_title character varying(255) NOT NULL,
    video_url text NOT NULL,
    video_title character varying(255) NOT NULL,
    description text,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: video_help_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.video_help ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.video_help_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: void_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.void_items (
    id integer NOT NULL,
    source_type character varying(255) NOT NULL,
    source_id integer NOT NULL,
    hold_item_id integer,
    sale_item_id integer,
    item_id integer NOT NULL,
    item_name character varying(255) NOT NULL,
    quantity numeric(12,3) NOT NULL,
    unit_price numeric(10,2) NOT NULL,
    tax_rate numeric(6,2),
    modifiers jsonb,
    remarks character varying(500),
    void_reason_id integer NOT NULL,
    voided_by integer NOT NULL,
    voided_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);


--
-- Name: void_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.void_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.void_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: void_orders; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.void_orders (
    id integer NOT NULL,
    store_id integer,
    sale_id integer NOT NULL,
    void_reason_id integer NOT NULL,
    voided_by integer NOT NULL,
    voided_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    notes text,
    original_amount numeric(10,2)
);


--
-- Name: void_orders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.void_orders ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.void_orders_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: void_reasons; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.void_reasons (
    id integer NOT NULL,
    reason_name character varying(100) NOT NULL,
    description text,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: void_reasons_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.void_reasons ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.void_reasons_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: warranties; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.warranties (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    months integer DEFAULT 0 NOT NULL,
    days integer DEFAULT 0 NOT NULL,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);


--
-- Name: warranties_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.warranties ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.warranties_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: wastage; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.wastage (
    id integer NOT NULL,
    wastage_number character varying(50) NOT NULL,
    store_id integer NOT NULL,
    branch_id integer DEFAULT 1 NOT NULL,
    wastage_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    total_items integer DEFAULT 0,
    total_wastage_value numeric(12,2) DEFAULT 0.00,
    remarks text,
    created_by integer NOT NULL,
    journal_entry_id integer,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: wastage_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.wastage ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.wastage_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: wastage_items; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.wastage_items (
    id integer NOT NULL,
    wastage_id integer NOT NULL,
    item_id integer NOT NULL,
    item_name character varying(255) NOT NULL,
    quantity numeric(12,6) NOT NULL,
    cost_price numeric(12,4) DEFAULT 0.0000 NOT NULL,
    line_value numeric(12,2) NOT NULL,
    loss_reason character varying(100)
);


--
-- Name: wastage_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.wastage_items ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.wastage_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: zatca_config; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.zatca_config (
    id integer NOT NULL,
    is_enabled boolean DEFAULT false,
    invoice_format character varying(255) DEFAULT 'pdf'::character varying,
    qr_code_size integer DEFAULT 150,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: zatca_config_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.zatca_config ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.zatca_config_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: zatca_invoices; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.zatca_invoices (
    id integer NOT NULL,
    sale_id integer NOT NULL,
    invoice_number character varying(100) NOT NULL,
    invoice_type character varying(255) DEFAULT 'simplified'::character varying,
    invoice_date timestamp without time zone NOT NULL,
    seller_vat character varying(50),
    buyer_vat character varying(50),
    buyer_name character varying(255),
    total_amount numeric(10,2) NOT NULL,
    tax_amount numeric(10,2) NOT NULL,
    amount_excluding_tax numeric(10,2) NOT NULL,
    qr_code_data text,
    qr_code_image_url text,
    invoice_data text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: zatca_invoices_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.zatca_invoices ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.zatca_invoices_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: zatca_phase2_api_logs; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.zatca_phase2_api_logs (
    id bigint NOT NULL,
    zatca_phase2_invoice_id bigint,
    endpoint character varying(255) NOT NULL,
    http_method character varying(10) DEFAULT 'POST'::character varying NOT NULL,
    request_headers text,
    request_body text,
    response_status integer,
    response_headers text,
    response_body text,
    duration_ms integer,
    correlation_id character varying(255),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: zatca_phase2_api_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.zatca_phase2_api_logs ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.zatca_phase2_api_logs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: zatca_phase2_certificates; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.zatca_phase2_certificates (
    id bigint NOT NULL,
    store_id integer,
    environment character varying(255) DEFAULT 'sandbox'::character varying NOT NULL,
    device_identifier character varying(150),
    certificate_type character varying(255) DEFAULT 'compliance_csid'::character varying NOT NULL,
    certificate_serial character varying(255),
    issuer_dn text,
    subject_dn text,
    valid_from timestamp without time zone,
    valid_to timestamp without time zone,
    csr_pem text,
    certificate_pem text,
    private_key_ref character varying(255),
    fingerprint_sha256 character varying(128),
    is_active boolean DEFAULT false NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: zatca_phase2_certificates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.zatca_phase2_certificates ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.zatca_phase2_certificates_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: zatca_phase2_device_state; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.zatca_phase2_device_state (
    id bigint NOT NULL,
    store_id integer NOT NULL,
    terminal_id integer,
    device_identifier character varying(150) NOT NULL,
    last_icv bigint DEFAULT 0 NOT NULL,
    last_invoice_uuid character(36),
    last_invoice_hash character varying(512),
    last_submission_at timestamp without time zone,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: zatca_phase2_device_state_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.zatca_phase2_device_state ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.zatca_phase2_device_state_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: zatca_phase2_invoices; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.zatca_phase2_invoices (
    id bigint NOT NULL,
    sale_id integer NOT NULL,
    invoice_number character varying(100) NOT NULL,
    invoice_type character varying(255) DEFAULT 'simplified'::character varying NOT NULL,
    uuid character(36) NOT NULL,
    icv bigint,
    previous_invoice_hash character varying(512),
    invoice_hash character varying(512),
    unsigned_xml text,
    signed_xml text,
    canonical_xml_hash character varying(512),
    qr_tlv_base64 text,
    authority_submission_type character varying(255),
    authority_invoice_ref character varying(255),
    authority_status character varying(50),
    authority_response_code character varying(50),
    authority_response_message text,
    status character varying(255) DEFAULT 'draft'::character varying NOT NULL,
    retry_count integer DEFAULT 0 NOT NULL,
    next_retry_at timestamp without time zone,
    last_error_at timestamp without time zone,
    last_error_message text,
    submitted_at timestamp without time zone,
    cleared_at timestamp without time zone,
    reported_at timestamp without time zone,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: zatca_phase2_invoices_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.zatca_phase2_invoices ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.zatca_phase2_invoices_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: zatca_phase2_jobs; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.zatca_phase2_jobs (
    id bigint NOT NULL,
    zatca_phase2_invoice_id bigint NOT NULL,
    job_type character varying(255) NOT NULL,
    status character varying(255) DEFAULT 'pending'::character varying NOT NULL,
    attempt_count integer DEFAULT 0 NOT NULL,
    max_attempts integer DEFAULT 8 NOT NULL,
    run_after timestamp without time zone,
    locked_at timestamp without time zone,
    locked_by character varying(100),
    last_error text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: zatca_phase2_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.zatca_phase2_jobs ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.zatca_phase2_jobs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: zatca_phase2_status_history; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.zatca_phase2_status_history (
    id bigint NOT NULL,
    zatca_phase2_invoice_id bigint NOT NULL,
    from_status character varying(50),
    to_status character varying(50) NOT NULL,
    event_source character varying(255) DEFAULT 'system'::character varying NOT NULL,
    reason_code character varying(100),
    reason_message text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: zatca_phase2_status_history_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

ALTER TABLE public.zatca_phase2_status_history ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
    SEQUENCE NAME public.zatca_phase2_status_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Data for Name: account_mappings; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.account_mappings (id, mapping_code, mapping_name, account_id, description, is_active, created_at, updated_at) FROM stdin;
1	rev_Sale	Sales Revenue	1	Primary sales income	t	2025-11-05 22:16:22	2025-11-05 22:16:22
2	rev_Service	Service Income	2	Service-related income	t	2025-11-05 22:16:22	2025-11-05 22:16:22
3	rev_Discount	Sales Discount	3	Sales discounts given	t	2025-11-05 22:16:22	2025-11-05 22:16:22
4	rev_Return	Sales Return	4	Sales returns and refunds	t	2025-11-05 22:16:22	2025-11-05 22:16:22
5	rev_Other	Other Income	5	Miscellaneous income	t	2025-11-05 22:16:22	2025-11-05 22:16:22
6	exp_CostOfSales	Cost of Goods Sold	6	Direct cost of inventory sold	t	2025-11-05 22:16:22	2025-11-05 22:16:22
7	ast_Cash	Cash in Hand	20	Physical cash on hand	t	2025-11-05 22:16:22	2025-11-05 22:16:22
8	ast_Bank	Bank Accounts	21	All bank accounts	t	2025-11-05 22:16:22	2025-11-05 22:16:22
9	ast_PettyCash	Petty Cash	22	Petty cash fund	t	2025-11-05 22:16:22	2025-11-05 22:16:22
10	ast_Customer	Accounts Receivable	23	Money owed by customers	t	2025-11-05 22:16:22	2025-11-05 22:16:22
11	ast_Stock	Inventory	24	Stock and supplies	t	2025-11-05 22:16:22	2025-11-05 22:16:22
12	ast_Prepaid	Prepaid Expenses	25	Prepaid rent, insurance, etc.	t	2025-11-05 22:16:22	2025-11-05 22:16:22
13	ast_TaxRecoverable	Tax Recoverable	26	Input tax recoverable	t	2025-11-05 22:16:22	2025-11-05 22:16:22
14	ast_Equipment	Equipment	28	Kitchen equipment, POS systems	t	2025-11-05 22:16:22	2025-11-05 22:16:22
15	ast_Furniture	Furniture and Fixtures	29	Tables, chairs, decor	t	2025-11-05 22:16:22	2025-11-05 22:16:22
16	ast_Vehicles	Vehicles	30	Delivery vehicles	t	2025-11-05 22:16:22	2025-11-05 22:16:22
17	ast_Buildings	Buildings	31	Restaurant premises	t	2025-11-05 22:16:22	2025-11-05 22:16:22
18	ast_AccumulatedDepreciation	Accumulated Depreciation	32	Accumulated depreciation	t	2025-11-05 22:16:22	2025-11-05 22:16:22
19	lib_Supplier	Accounts Payable	34	Money owed to suppliers	t	2025-11-05 22:16:22	2025-11-05 22:16:22
20	lib_Accrued	Accrued Expenses	35	Accrued wages, utilities	t	2025-11-05 22:16:22	2025-11-05 22:16:22
21	lib_Tax	Taxes Payable	36	Sales tax, income tax	t	2025-11-05 22:16:22	2025-11-05 22:16:22
22	lib_Unearned	Unearned Revenue	37	Advance payments received	t	2025-11-05 22:16:22	2025-11-05 22:16:22
23	eqt_Investment	Owner's Investment	38	Initial and additional investments	t	2025-11-05 22:16:22	2025-11-05 22:16:22
24	eqt_RetainedEarnings	Retained Earnings	39	Accumulated profits/losses	t	2025-11-05 22:16:22	2025-11-05 22:16:22
25	eqt_CurrentYear	Current Year Earnings	40	Current year profit/loss	t	2025-11-05 22:16:22	2025-11-05 22:16:22
26	exp_Expenses	Operating Expenses	7	All operating expenses	t	2025-11-05 22:16:22	2025-11-05 22:16:22
27	exp_Payroll	Payroll Expenses	8	Wages and salaries	t	2025-11-05 22:16:22	2025-11-05 22:16:22
28	exp_Rent	Rent Expense	9	Premises rent	t	2025-11-05 22:16:22	2025-11-05 22:16:22
29	exp_Utilities	Utilities	10	Electricity, water, gas	t	2025-11-05 22:16:22	2025-11-05 22:16:22
30	exp_Marketing	Marketing	11	Advertising and promotion	t	2025-11-05 22:16:22	2025-11-05 22:16:22
31	exp_Supplies	Supplies	12	Operating supplies	t	2025-11-05 22:16:22	2025-11-05 22:16:22
32	exp_Maintenance	Maintenance	13	Equipment maintenance	t	2025-11-05 22:16:22	2025-11-05 22:16:22
33	exp_Insurance	Insurance	14	Business insurance	t	2025-11-05 22:16:22	2025-11-05 22:16:22
34	exp_ProfessionalFees	Professional Fees	15	Legal, accounting fees	t	2025-11-05 22:16:22	2025-11-05 22:16:22
35	exp_BankCharges	Bank Charges	16	Bank fees and charges	t	2025-11-05 22:16:22	2025-11-05 22:16:22
36	exp_Depreciation	Depreciation	17	Asset depreciation	t	2025-11-05 22:16:22	2025-11-05 22:16:22
37	exp_StockLoss	Stock Loss	41	Account for tracking inventory losses and stock adjustments	t	2025-11-05 22:16:23	2025-11-05 22:16:23
38	rev_StockGain	Stock Gain	45	Revenue from inventory count increases / stock adjustments	t	2026-04-03 18:59:27	2026-04-03 18:59:27
39	ast_CardUnsettled	Card Unsettled Receipts	46	Card receipts awaiting settlement	t	2026-04-24 17:33:50	2026-04-24 17:33:50
\.


--
-- Data for Name: account_transactions; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.account_transactions (id, store_id, branch_id, sale_id, account_type, account_id, cheque_id, card_type_id, card_last_four, card_transaction_ref, is_reconciled, amount, tip_amount, description, created_at) FROM stdin;
\.


--
-- Data for Name: account_types; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.account_types (id, type_code, type_name, default_side, description, sort_order, created_at) FROM stdin;
1	AST	Assets	DR	All asset accounts	1	2025-11-05 22:16:22
2	LBT	Liabilities	CR	All liability accounts	2	2025-11-05 22:16:22
3	EQT	Equity	CR	All equity accounts	3	2025-11-05 22:16:22
4	REV	Revenue	CR	All revenue accounts	4	2025-11-05 22:16:22
5	EXP	Expenses	DR	All expense accounts	5	2025-11-05 22:16:22
\.


--
-- Data for Name: bank_access; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.bank_access (user_id, bank_account_id, created_at, created_by) FROM stdin;
\.


--
-- Data for Name: bank_accounts; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.bank_accounts (id, bank_name, account_title, chart_of_account_id, mapped_at, mapped_by, account_number, iban, branch_name, branch_code, swift_code, address, is_active, created_at) FROM stdin;
\.


--
-- Data for Name: bom_components; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.bom_components (id, bom_id, component_item_id, quantity) FROM stdin;
\.


--
-- Data for Name: bom_master; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.bom_master (id, item_id, description, created_at) FROM stdin;
\.


--
-- Data for Name: branch_access; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.branch_access (user_id, branch_id, created_at, created_by) FROM stdin;
1	1	2026-06-02 16:05:21.122153	\N
4	1	2026-06-02 18:23:52.854543	1
\.


--
-- Data for Name: branch_info; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.branch_info (id, default_store_id, branch_name, branch_code, branch_address, created_at, license_key, machine_id, last_verified_at, license_cache, ntn, strn, branch_phone, facebook_url, instagram_url, youtube_url, province, is_active, branch_type, is_default) FROM stdin;
\.


--
-- Data for Name: card_types; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.card_types (id, card_code, card_name, display_name, icon_class, color_class, default_charge_rate, sort_order, is_active, created_at) FROM stdin;
1	VISA	VISA	VISA Card	fab fa-cc-visa	btn-outline-primary	0.00	1	t	2025-11-05 22:16:38
2	MASTER	MasterCard	MasterCard	fab fa-cc-mastercard	btn-outline-warning	0.00	2	t	2025-11-05 22:16:38
3	QR	QR Code	QR Payment	fas fa-qrcode	btn-outline-success	0.00	3	t	2025-11-05 22:16:38
\.


--
-- Data for Name: categories; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.categories (id, name, icon) FROM stdin;
\.


--
-- Data for Name: chart_of_accounts; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.chart_of_accounts (id, account_code, account_name, account_type, account_category, parent_account_id, account_level, is_active, description, opening_balance, current_balance, store_id, created_at, updated_at) FROM stdin;
2	4001	Service Income	revenue	revenue	\N	1	t	Service-related income	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
3	4002	Sales Discount	revenue	revenue	\N	1	t	Sales discounts given	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
5	4004	Other Income	revenue	revenue	\N	1	t	Miscellaneous income	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
7	6000	Operating Expenses	expense	operating_expense	\N	1	t	All operating expenses	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
8	6001	Payroll Expenses	expense	operating_expense	\N	2	t	Wages and salaries	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
9	6002	Rent Expense	expense	operating_expense	\N	2	t	Premises rent	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
11	6004	Marketing	expense	operating_expense	\N	2	t	Advertising and promotion	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
12	6005	Supplies	expense	operating_expense	\N	2	t	Operating supplies	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
22	1103	Petty Cash	asset	current_asset	\N	3	t	Petty cash fund	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
13	6006	Maintenance	expense	operating_expense	\N	2	t	Equipment maintenance	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
14	6007	Insurance	expense	operating_expense	\N	2	t	Business insurance	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
15	6008	Professional Fees	expense	operating_expense	\N	2	t	Legal, accounting fees	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
16	6009	Bank Charges	expense	operating_expense	\N	2	t	Bank fees and charges	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
17	6010	Depreciation	expense	operating_expense	\N	2	t	Asset depreciation	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
19	1100	Cash and Cash Equivalents	asset	current_asset	\N	2	t	Cash and bank accounts	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
21	1102	Bank Accounts	asset	current_asset	\N	3	t	All bank accounts	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
23	1200	Accounts Receivable	asset	current_asset	\N	2	t	Money owed by customers	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
25	1400	Prepaid Expenses	asset	current_asset	\N	2	t	Prepaid rent, insurance, etc.	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
26	1500	Tax Recoverable	asset	current_asset	\N	2	t	Input tax recoverable	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
27	2000	Fixed Assets	asset	fixed_asset	\N	1	t	All fixed assets	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
28	2100	Equipment	asset	fixed_asset	\N	2	t	Kitchen equipment, POS systems	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
29	2200	Furniture and Fixtures	asset	fixed_asset	\N	2	t	Tables, chairs, decor	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
30	2300	Vehicles	asset	fixed_asset	\N	2	t	Delivery vehicles	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
31	2400	Buildings	asset	fixed_asset	\N	2	t	Restaurant premises	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
32	2500	Accumulated Depreciation	asset	fixed_asset	\N	2	t	Accumulated depreciation	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
33	3000	Current Liabilities	liability	current_liability	\N	1	t	All current liabilities	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
35	3200	Accrued Expenses	liability	current_liability	\N	2	t	Accrued wages, utilities	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
36	3300	Taxes Payable	liability	current_liability	\N	2	t	Sales tax, income tax	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
38	4100	Owner's Investment	equity	equity	\N	2	t	Initial and additional investments	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
37	3400	Unearned Revenue	liability	current_liability	\N	2	t	Advance payments received	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
39	4200	Retained Earnings	equity	equity	\N	2	t	Accumulated profits/losses	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
40	4300	Current Year Earnings	equity	equity	\N	2	t	Current year profit/loss	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
41	6011	Stock Loss	expense	operating_expense	\N	2	t	Losses due to stock adjustments, damage, theft, or obsolescence	0.00	0.00	1	2025-11-05 22:16:23	2026-06-02 21:15:22.959671
43	7910	Cash Adjustments	expense	other_expense	\N	2	t	Adjustments made to reconcile cash balances	0.00	0.00	1	2026-04-02 19:24:27	2026-06-02 21:15:22.959671
44	7911	Supplier Account Payable	liability	current_liability	\N	1	t		0.00	0.00	1	2026-04-02 20:07:09	2026-06-02 21:15:22.959671
45	4005	Stock Gain	revenue	revenue	\N	1	t	Income from physical inventory increases (stock adjustments)	0.00	0.00	1	2026-04-03 18:59:27	2026-06-02 21:15:22.959671
46	1104	Card Unsettled Receipts	asset	current_asset	19	3	t	Card payments pending settlement from bank/processor	0.00	0.00	1	2026-04-24 17:33:50	2026-06-02 21:15:22.959671
1	4000	Sales Revenue	revenue	revenue	\N	1	t	Primary sales income	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
34	3100	Accounts Payable	liability	current_liability	\N	2	t	Money owed to suppliers	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
6	5000	Cost of Goods Sold	expense	cost_of_sales	\N	1	t	Direct cost of inventory sold	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
18	1000	Current Assets	asset	current_asset	\N	1	t	All current assets	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
10	6003	Utilities	expense	operating_expense	\N	2	t	Electricity, water, gas	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
4	4003	Sales Return	revenue	revenue	\N	1	t	Sales returns and refunds	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
42	6012	Sample Test Bank	asset	current_asset	\N	1	t		0.00	0.00	1	2026-03-29 16:17:23	2026-06-02 21:15:22.959671
24	1300	Inventory	asset	current_asset	\N	2	t	Stock and supplies	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
20	1101	Cash in Hand	asset	current_asset	\N	3	t	Physical cash on hand	0.00	0.00	1	2025-11-05 22:16:22	2026-06-02 21:15:22.959671
\.


--
-- Data for Name: cheque_books; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.cheque_books (id, bank_account_id, branch_id, first_cheque_number, last_cheque_number, cheque_count, notes, created_by, created_at) FROM stdin;
\.


--
-- Data for Name: cheques; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.cheques (id, cheque_book_id, bank_account_id, branch_id, cheque_number, status, amount, sale_id, payee_name, issue_date, cleared_date, bounced_date, memo, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: cus_outstanding; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.cus_outstanding (id, sale_id, customer_id, amount, status, created_at) FROM stdin;
\.


--
-- Data for Name: cus_payments; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.cus_payments (id, store_id, customer_id, sale_id, balance_entry_id, amount_paid, payment_date, remarks) FROM stdin;
\.


--
-- Data for Name: customer_balance_entries; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.customer_balance_entries (id, entry_number, customer_id, store_id, entry_type, amount, remaining_amount, reference_no, remarks, map_account_id, journal_entry_id, status, created_by, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: customer_categories; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.customer_categories (id, category_name, description, created_at) FROM stdin;
\.


--
-- Data for Name: customer_subscription_invoices; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.customer_subscription_invoices (id, subscription_id, sale_id, period_start, period_end, amount, created_at) FROM stdin;
\.


--
-- Data for Name: customer_subscriptions; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.customer_subscriptions (id, store_id, customer_id, item_id, subscription_plan_id, status, start_date, current_period_end, next_renewal_date, amount, auto_renew, notes, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: customers; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.customers (id, primary_store_id, name, phone, email, address, is_walk_in, ntn, province, active, discount_applied, discount_rate, withholding_rate, category_id, customer_type, created_at) FROM stdin;
\.


--
-- Data for Name: deal_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.deal_items (id, deal_id, selection_type, category_id, sub_category_id, item_id, sort_order, created_at, min_selection, max_selection) FROM stdin;
\.


--
-- Data for Name: deals; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.deals (id, item_id, deal_name, deal_price, is_active, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: delivery_orders; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.delivery_orders (id, store_id, sale_id, customer_id, rider_id, delivery_status, delivery_address, delivery_time, created_at) FROM stdin;
\.


--
-- Data for Name: delivery_riders; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.delivery_riders (id, assigned_store_id, name, phone, email, vehicle_number, is_active, created_at) FROM stdin;
\.


--
-- Data for Name: dinein_floors; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.dinein_floors (id, store_id, name, description, is_active) FROM stdin;
\.


--
-- Data for Name: dinein_tables; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.dinein_tables (id, store_id, floor_id, table_name, seats, status, is_active) FROM stdin;
\.


--
-- Data for Name: discount_categories; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.discount_categories (id, category_name, display_order, is_active, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: discounts; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.discounts (id, discount_name, discount_code, discount_type, discount_rate, discount_cap, category_id, is_active, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: expense_accounts; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.expense_accounts (id, category_id, subcategory_id, name, chart_of_account_id, mapped_at, mapped_by) FROM stdin;
\.


--
-- Data for Name: expense_categories; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.expense_categories (id, name) FROM stdin;
\.


--
-- Data for Name: expense_subcategories; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.expense_subcategories (id, category_id, name, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: expenses; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.expenses (id, store_id, branch_id, shift_id, expense_payment_group_id, account_id, remarks, amount, expense_date, payment_method, bank_account_id, journal_entry_id, status, approved_by, approved_at, reversal_date, reversal_reason, reversal_journal_id, rejection_reason, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: fbr_config; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.fbr_config (id, is_enabled, display_name, api_url, pos_id, usin) FROM stdin;
\.


--
-- Data for Name: fbr_digital; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.fbr_digital (id, is_enabled, api_url, token, mode, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: fbr_invoices; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.fbr_invoices (id, sale_id, fbr_invoice_number, qr_code, created_at) FROM stdin;
\.


--
-- Data for Name: fbr_logs; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.fbr_logs (id, sale_id, response, created_at) FROM stdin;
\.


--
-- Data for Name: fiscal_period_setup; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.fiscal_period_setup (start_year, start_month, start_day, month_count, open_year) FROM stdin;
\.


--
-- Data for Name: fiscal_periods; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.fiscal_periods (id, period_code, period_name, period_year, start_date, end_date, is_closed, period_status, closed_by, closed_at, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: hold_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.hold_items (id, store_id, hold_id, item_id, item_name, quantity, unit_price, original_unit_price, discount_type, discount_value, discount_per_unit, discount_amount, tax_rate, modifiers, remarks, void_status, template_id, is_deal, deal_selections, serial_ids) FROM stdin;
\.


--
-- Data for Name: hold_orders; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.hold_orders (id, token_number, shift_id, store_id, customer_name, customer_id, table_id, order_mode, rider_id, created_at, updated_at, total_amount, discount_id, discount_type, discount_value, discount_amount, order_taker_id, number_of_guests, reserved_invoice_number) FROM stdin;
\.


--
-- Data for Name: inventory_movements; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.inventory_movements (id, item_id, store_id, branch_id, movement_type, reference_type, reference_id, quantity, created_at) FROM stdin;
\.


--
-- Data for Name: item_barcodes; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.item_barcodes (id, item_id, barcode, barcode_label, is_active, created_at) FROM stdin;
\.


--
-- Data for Name: item_line_discounts; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.item_line_discounts (id, item_id, discount_type, discount_value, is_active, starts_at, expires_at, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: item_modifier_group_assignments; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.item_modifier_group_assignments (id, item_id, modifier_group_id, is_required, sort_order, created_at) FROM stdin;
\.


--
-- Data for Name: item_modifier_groups; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.item_modifier_groups (id, name, display_name, description, is_required, is_multiple_choice, max_selections, min_selections, is_active, sort_order, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: item_modifiers; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.item_modifiers (id, name, short_name, price_adjustment, cost_adjustment, is_default, is_active, sort_order, prep_time_adjustment, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: item_serial_transactions; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.item_serial_transactions (id, serial_id, item_id, trans_type, doc_type, doc_id, header_id, branch_id, user_id, remarks, created_at) FROM stdin;
\.


--
-- Data for Name: item_serials; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.item_serials (id, item_id, serial_no, details, cost_price, selling_price, warranty_name, warranty_expiry, status_code, branch_id, supplier_id, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.items (id, item_code, sku_number, name, description, retail_price, wholesale_price, cost_price, reorder_quantity, reorder_level, tax_type, tax_rate_id, category_id, sub_category_id, bulk_qty, bulk_price, pkg_qty, uom_id, item_type, product_image, display_color, item_role, is_serialized, is_third_schedule, is_active, supplier_id, prep_time) FROM stdin;
\.


--
-- Data for Name: journal_entries; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.journal_entries (id, entry_number, entry_date, period_id, transaction_date, source_type, reference_id, description, total_debit, total_credit, status, store_id, branch_id, user_id, posted_at, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: journal_entry_lines; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.journal_entry_lines (id, journal_entry_id, account_id, debit_amount, credit_amount, description, created_at) FROM stdin;
\.


--
-- Data for Name: kds_activity_log; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.kds_activity_log (id, store_id, kds_order_id, kds_order_item_id, action, details, description, user_id, created_at) FROM stdin;
\.


--
-- Data for Name: kds_cleanup_log; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.kds_cleanup_log (id, cleanup_date, retention_days, orders_deleted, order_items_deleted, activity_logs_deleted, total_records_deleted, execution_time_ms, status, message, created_at) FROM stdin;
\.


--
-- Data for Name: kds_order_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.kds_order_items (id, store_id, kds_order_id, sale_item_id, hold_item_id, item_id, item_name, quantity, unit_price, total_price, item_status, special_instructions, preparation_notes, prepared_at, served_at, prepared_by, served_by, sort_order, created_at, item_status_type, served_quantity, total_quantity) FROM stdin;
\.


--
-- Data for Name: kds_orders; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.kds_orders (id, store_id, sale_id, hold_id, invoice_number, order_number, table_number, customer_name, order_type, order_status, priority, estimated_time, notes, created_at, updated_at, prepared_at, served_at, created_by, prepared_by, served_by, order_taker_id, order_sequence, parent_order_id) FROM stdin;
\.


--
-- Data for Name: kds_settings; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.kds_settings (id, store_id, setting_key, setting_value, description, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: kds_station_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.kds_station_items (id, store_id, station_id, item_id, preparation_time, is_active, created_at) FROM stdin;
\.


--
-- Data for Name: kds_stations; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.kds_stations (id, store_id, name, description, printer_id, enable_kot_print, color, is_active, sort_order, created_at, preparation_time) FROM stdin;
\.


--
-- Data for Name: kpra_config; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.kpra_config (id, is_enabled, key, pos_id, business_id, api_url, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: kpra_invoices; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.kpra_invoices (id, sale_id, kpra_invoice_number, qr_code_url, qr_code_image, response_status, response_message, created_at) FROM stdin;
\.


--
-- Data for Name: kpra_logs; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.kpra_logs (id, sale_id, request_data, response_data, status_code, created_at) FROM stdin;
\.


--
-- Data for Name: languages; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.languages (id, code, name, native_name, flag, rtl, active, created_at) FROM stdin;
1	en	English	English	us.png	f	t	2025-11-05 22:16:29
2	fa	Persian	فارسی	ir.png	t	t	2025-11-05 22:16:29
3	ur	Urdu	اردو	pk.png	t	t	2025-11-05 22:16:29
4	ar	Arabic	العربية	sa.png	t	t	2025-11-05 22:16:38
\.


--
-- Data for Name: modifier_group_assignments; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.modifier_group_assignments (id, modifier_id, modifier_group_id, is_required, sort_order, created_at) FROM stdin;
\.


--
-- Data for Name: modifier_template_options; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.modifier_template_options (id, template_id, name, price_adjustment, is_active, sort_order, created_at) FROM stdin;
\.


--
-- Data for Name: modifier_templates; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.modifier_templates (id, name, icon, is_active, sort_order, created_at) FROM stdin;
\.


--
-- Data for Name: order_takers; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.order_takers (id, assigned_store_id, name, employee_id, phone, email, commission_rate, password, user_id, is_active, created_at) FROM stdin;
\.


--
-- Data for Name: payment_method_tax_rates; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.payment_method_tax_rates (id, payment_method, tax_rate, is_active, created_at, updated_at) FROM stdin;
1	cash	16.00	t	2025-11-05 22:16:15	2026-05-20 20:20:00
2	card	5.00	t	2025-11-05 22:16:15	2026-05-20 20:20:03
4	bank	6.00	t	2025-11-05 22:16:15	2025-11-05 22:16:15
5	credit	0.00	t	2025-11-05 22:16:15	2025-11-05 22:16:15
6	cheque	6.00	t	2026-04-05 18:18:35	2026-04-05 18:18:35
3	easypaisa	6.00	t	2025-11-05 22:16:15	2025-11-05 22:16:15
\.


--
-- Data for Name: payment_methods; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.payment_methods (id, method_name, display_name, icon_class, color_class, is_active, requires_bank_account, sort_order, created_at) FROM stdin;
1	cash	Cash Payment	fas fa-money-bill-wave	btn-outline-success	t	f	1	2025-08-17 19:35:24
2	card	Card Payment	fas fa-credit-card	btn-outline-primary	t	f	2	2025-08-17 19:35:24
4	bank	Bank Transfer	fas fa-university	btn-outline-warning	t	t	4	2025-08-17 19:35:24
5	credit	Credit Sale	fas fa-clock	btn-outline-secondary	t	f	5	2025-08-17 19:35:24
7	cheque	Cheque	fas fa-money-check-alt	btn-outline-secondary	t	t	6	2026-04-05 18:18:34
3	easypaisa	Easypaisa	fas fa-mobile-alt	btn-outline-info	t	t	3	2025-08-17 19:35:24
\.


--
-- Data for Name: price_history; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.price_history (id, item_id, item_name, vendor_id, old_cost_price, new_cost_price, old_retail_price, new_retail_price, changed_by, changed_at) FROM stdin;
\.


--
-- Data for Name: print_devices; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.print_devices (id, name, connection_type, print_type, terminal_id, printer_name, printer_type, print_mode, copies, ip_address, is_active, is_default, auto_detect, created_at) FROM stdin;
1	Counter Receipt Printer	usb	receipt	\N	BC-96AC	thermal	ask	1	192.168.1.24	t	t	t	2025-11-05 22:16:29
2	Kitchen KOT Printer	usb	kot	\N	Black Copper 80	thermal	ask	1	192.168.1.100	t	t	t	2025-11-05 22:16:29
3	Barcode Label Printer	usb	barcode	\N	Microsoft Print to PDF	thermal	auto	1	\N	t	f	t	2025-11-05 22:16:29
\.


--
-- Data for Name: production_cost_lines; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.production_cost_lines (id, production_item_id, cost_type, description, quantity, unit_rate, amount, created_at) FROM stdin;
\.


--
-- Data for Name: production_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.production_items (id, production_order_id, material_store_id, finish_store_id, item_id, quantity, unit_cost, total_cost, status, created_at) FROM stdin;
\.


--
-- Data for Name: production_materials; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.production_materials (id, production_item_id, material_item_id, quantity_consumed, unit_cost, total_cost, created_at) FROM stdin;
\.


--
-- Data for Name: production_orders; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.production_orders (id, order_number, production_date, status, remarks, total_cost, created_by, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: purchase_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.purchase_items (id, store_id, purchase_id, item_id, item_name, quantity, unit_cost, total_cost, tax_rate) FROM stdin;
\.


--
-- Data for Name: purchase_order_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.purchase_order_items (id, purchase_order_id, item_id, item_name, quantity, quantity_loose, unit_cost, retail_price, total_cost, tax_rate, purchase_mode, bulk_base_qty) FROM stdin;
\.


--
-- Data for Name: purchase_orders; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.purchase_orders (id, po_number, vendor_id, store_id, branch_id, po_date, total_amount, tax_amount, discount_amount, net_amount, notes, status, converted_purchase_id, converted_at, created_at) FROM stdin;
\.


--
-- Data for Name: purchase_return_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.purchase_return_items (id, purchase_return_id, item_id, quantity, unit_cost, total_cost, tax_rate) FROM stdin;
\.


--
-- Data for Name: purchase_returns; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.purchase_returns (id, store_id, purchase_id, vendor_id, return_date, total_amount, remarks, customer_remarks, created_by, created_at) FROM stdin;
\.


--
-- Data for Name: purchases; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.purchases (id, store_id, branch_id, purchase_number, vendor_id, purchase_date, total_amount, tax_amount, discount_amount, net_amount, payment_method, status, source_po_id, created_at) FROM stdin;
\.


--
-- Data for Name: quotation_drafts; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.quotation_drafts (id, user_id, store_id, payload, updated_at) FROM stdin;
\.


--
-- Data for Name: quotation_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.quotation_items (id, quotation_id, item_id, item_name, quantity, unit_price, total_price, tax_rate, line_discount_percent, remarks) FROM stdin;
\.


--
-- Data for Name: quotations; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.quotations (id, store_id, quotation_number, customer_id, customer_name, quotation_date, subtotal, tax_amount, discount_amount, net_amount, status, remarks, created_by, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: rights; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.rights (id, name, description, category) FROM stdin;
1	Create User		User Management
2	Item List		Products
3	Users List		User Management
4	Add Item		Products
5	View Taxes		Tax
6	View Taxes		Tax
7	Manage Categories		Products
8	Create Customer		Customers
9	Manage SubCategories		Products
10	Create Taxes		Tax
11	View Categories		Products
12	Delete Items		Products
13	Edit Items		Products
14	Edit Taxes		Tax
15	Add Expense		Expenses
16	Add Purchase		Purchases
17	Add Supplier		Vendors
18	Assign Rights		User Rights
19	Create Role		User Rights
20	View Expense Accounts		Expenses
21	Expense Categories		Expenses
22	Expense List		Expenses
23	Access POS		POS
24	Sales Report		Reports
25	Purchase Report		Reports
26	Edit Sale Price in POS	Allows editing item prices during sale in POS	POS
27	Daily Sales Report	View daily sales summary report	Reports
28	Shift Report	View cashier shift reports	Reports
29	Invoice Report	View detailed invoice reports	Reports
30	Invoice Profit Report	View invoice profit analysis	Reports
31	Itemwise Sales Report	View sales report by items	Reports
32	Tax Wise Report	View tax summary reports	Reports
33	Discount Report	View discount usage reports	Reports
34	Void Orders Report	View voided orders report	Reports
35	Sale Return Report	View sale returns report	Reports
36	Purchase Return Report	View purchase returns report	Reports
37	Order Taker Report	View order taker performance report	Reports
38	Stock Balance Report	View current stock balance	Reports
39	Stock Valuation Report	View stock valuation report	Reports
40	Reorder Report	View items that need reordering	Reports
41	Item Cost Report	View item cost analysis	Reports
42	Item Ledger Report	View item transaction ledger	Reports
43	Item Modifier Report	View item modifiers usage report	Reports
44	KDS Order Report	View kitchen display orders report	Reports
45	KPRA Sales Report	View KPRA integrated sales report	Reports
46	Production Reports	View production and manufacturing reports	Reports
47	Account Report	View account summary reports	Reports
48	Financial Reports	View financial statements and reports	Reports
49	Serial Tracking Report	View serial number tracking report	Reports
50	FBR Sales Report	View FBR integrated sales report	Reports
51	Profit & Loss	View profit and loss statement report	Reports
52	ZATCA Sales Report	View ZATCA integrated sales report	Reports
55	Customer Category	View and manage customer categories	Sales
56	Item Modifier Management	View and manage item modifiers	Sales
57	Void Reasons	View and manage void reasons	Sales
58	Quotations	View and manage quotations	Sales
59	Delivery Challan	View and manage delivery challans	Sales
60	Discount Management	View and manage discounts	Sales
61	Deal Management	View and manage deals	Sales
62	Order Takers	View and manage order takers	Sales
63	Tables	View and manage tables for dine-in	Sales
64	Floors	View and manage floors for dine-in	Sales
65	Riders	View and manage delivery riders	Sales
66	Delivery Orders	View and manage delivery orders	Sales
53	Customer List	View and manage customer list	Sales
54	Customer Balance	View customer balances and account statements	Sales
67	Items	View and manage items	Inventory
68	Item Categories	View and manage item categories	Inventory
69	UOM Management	View and manage unit of measurement	Inventory
70	Purchases	View and manage purchases	Inventory
71	Suppliers	View and manage suppliers	Inventory
72	Supplier Balance	View supplier balances and account statements	Inventory
73	Stock Transfer Request	Create and manage stock transfer requests	Inventory
74	Stock Transfer Approval	Approve stock transfer requests	Inventory
75	Stock Adjustment List	View stock adjustment list	Inventory
76	Stock Adjustment	Create new stock adjustments	Inventory
77	Production Orders	View and manage production orders	Inventory
78	Opening Balance	Manage opening balances	Inventory
79	Expenses	View and manage expenses	Accounts
80	Expense Accounts	View and manage expense accounts	Accounts
81	Expense Categories	View and manage expense categories	Accounts
82	Bank Accounts	View and manage bank accounts	Accounts
83	Payment Methods	View and manage payment methods	Accounts
84	Card Types	View and manage card types	Accounts
85	Customer Payments	View and manage customer payments	Accounts
86	Supplier Payments	View and manage supplier payments	Accounts
87	Bank Ledger	View bank account ledger with all transactions	Accounts
88	Cash Ledger	View cash account ledger with all transactions	Accounts
89	Chart of Accounts	View and manage chart of accounts	Financials
90	Account Mappings	View and manage account mappings	Financials
91	Period Management	View and manage accounting periods	Financials
92	Terminals	View and manage terminals	Hardware
93	Print Devices	View and manage print devices	Hardware
94	KOT/KDS	View and manage KOT/KDS management	Hardware
95	Tablet Orders	View and manage tablet orders	Hardware
96	Backup Tool	Access backup tool for database operations	Hardware
97	General Settings	Access general system settings	Settings
98	Branches	View and manage branches	Settings
99	Stores	View and manage stores	Settings
100	Sync Settings	Manage sync settings	Settings
101	Languages	Manage language settings	Settings
102	Tax Rates	View and manage tax rates	Settings
103	DB Operations	Access database operations panel	Settings
104	Users & Permissions	Manage users and permissions	Settings
105	Customer List	Manage customer	Sales
106	General Ledger	View detailed transaction history for accounts	Financials
107	Trial Balance	View trial balance report showing account balances	Financials
108	Account Ledger	View all cash and bank transactions with running balance	Financials
109	Profit Chart	View monthly profit analysis chart	Financials
110	Quick Transaction	Create quick financial transactions	Financials
111	Journal Entries	View and manage journal entries	Financials
112	Rider Sales Report	View rider-wise delivery sales report	Reports
113	Wastage	Record stock wastage and damage	Inventory
114	Cheques	View and manage cheque books and cheque status	Accounts
115	ITR Assistant	Access and use ITR Assistant chat/call features	Settings
116	Card Reconciliation	View and reconcile card transactions	Accounts
117	Subscriptions	View and manage customer subscriptions	Accounts
\.


--
-- Data for Name: role_rights; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.role_rights (role_id, right_id) FROM stdin;
1	1
1	2
1	3
1	4
1	5
1	6
1	7
1	8
1	9
1	10
1	11
1	12
1	13
1	14
1	15
1	16
1	17
1	18
1	19
1	20
1	21
1	22
1	23
1	24
1	25
1	26
1	27
1	28
1	29
1	30
1	31
1	32
1	33
1	34
1	35
1	36
1	37
1	38
1	39
1	40
1	41
1	42
1	43
1	44
1	45
1	46
1	47
1	48
1	49
1	50
1	51
1	52
1	53
1	54
1	55
1	56
1	57
1	58
1	59
1	60
1	61
1	62
1	63
1	64
1	65
1	66
1	67
1	68
1	69
1	70
1	71
1	72
1	73
1	74
1	75
1	76
1	77
1	78
1	79
1	80
1	81
1	82
1	83
1	84
1	85
1	86
1	87
1	88
1	89
1	90
1	91
1	92
1	93
1	94
1	95
1	96
1	97
1	98
1	99
1	100
1	101
1	102
1	103
1	104
1	106
1	107
1	108
1	109
1	110
1	111
1	112
1	113
1	114
1	115
1	117
2	23
\.


--
-- Data for Name: roles; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.roles (id, name) FROM stdin;
1	Admin
2	Cashier
\.


--
-- Data for Name: sale_item_modifiers; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.sale_item_modifiers (id, sale_item_id, modifier_id, modifier_group_id, modifier_name, price_adjustment, created_at) FROM stdin;
\.


--
-- Data for Name: sale_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.sale_items (id, store_id, sale_id, item_id, item_name, quantity, unit_price, original_unit_price, total_price, discount_type, discount_value, discount_per_unit, discount_amount, tax_rate, remarks, is_deal, deal_selections) FROM stdin;
\.


--
-- Data for Name: sale_return_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.sale_return_items (id, sale_return_id, item_id, quantity, unit_price, total_price, tax_rate) FROM stdin;
\.


--
-- Data for Name: sale_returns; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.sale_returns (id, store_id, sale_id, return_source, customer_id, return_date, total_amount, remarks, customer_remarks, payment_method, bank_account_id, created_by, created_at) FROM stdin;
\.


--
-- Data for Name: sales; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.sales (id, terminal_id, store_id, branch_id, invoice_number, sale_date, customer_name, customer_id, total_amount, tax_amount, discount_amount, withholding_amount, discount_id, net_amount, payment_method, created_at, shift_id, is_fbr_enabled, is_kpra_enabled, zatca_phase2_invoice_id, table_id, order_mode, discount_type, discount_value, service_charges, tip_amount, order_taker_id, number_of_guests, void_id) FROM stdin;
\.


--
-- Data for Name: setting_categories; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.setting_categories (id, name, code) FROM stdin;
1	Print Settings	print_settings
2	FBR Integration	integration
3	FBR Digital Integration	fbr_digital_integration
4	Sales Orders	sales_orders
5	Barcode Settings	barcode_settings
6	POS	pos
7	System Settings	system_settings
8	KPRA Integration	kpra_integration
9	Tax Settings	tax_settings
10	KDS	kds
11	Accounts	accounts
12	ZATCA Integration	zatca_integration
13	WhatsApp	whatsapp
\.


--
-- Data for Name: setting_options; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.setting_options (id, setting_id, option_label, option_value) FROM stdin;
1	11	Pakistan (Karachi)	Asia/Karachi
2	11	Pakistan (Lahore)	Asia/Karachi
3	11	Pakistan (Islamabad)	Asia/Karachi
4	11	India (Mumbai)	Asia/Kolkata
5	11	India (Delhi)	Asia/Kolkata
6	11	Bangladesh (Dhaka)	Asia/Dhaka
7	11	Sri Lanka (Colombo)	Asia/Colombo
8	11	Nepal (Kathmandu)	Asia/Kathmandu
9	11	UAE (Dubai)	Asia/Dubai
10	11	Saudi Arabia (Riyadh)	Asia/Riyadh
11	11	Qatar (Doha)	Asia/Qatar
12	11	Kuwait (Kuwait City)	Asia/Kuwait
13	11	Bahrain (Manama)	Asia/Bahrain
14	11	Oman (Muscat)	Asia/Muscat
15	11	UK (London)	Europe/London
16	11	USA (New York)	America/New_York
17	11	USA (Los Angeles)	America/Los_Angeles
18	11	Canada (Toronto)	America/Toronto
19	11	Australia (Sydney)	Australia/Sydney
20	11	UTC (Universal Time)	UTC
21	12	YYYY-MM-DD (ISO)	Y-m-d
22	12	DD/MM/YYYY	d/m/Y
23	12	MM/DD/YYYY	m/d/Y
24	12	DD-MM-YYYY	d-m-Y
25	12	MM-DD-YYYY	m-d-Y
26	12	DD.MM.YYYY	d.m.Y
27	12	MM.DD.YYYY	m.d.Y
28	17	Item-wise Tax (Current)	item_wise
29	17	Payment Method Tax	payment_method
30	28	Popup (Browser Dialog)	popup
31	28	Direct to Device	direct
32	29	Ask User	ask
33	29	Auto Print	auto
34	29	No Print	no
35	34	Before GST (reduce taxable amount)	before_tax
36	34	After GST (discount tax-inclusive total)	after_tax
37	35	Thermal (80mm)	thermal
38	35	A4 (Letter Size)	a4
39	38	Pakistani Rupee (Rs)	Rs
40	38	Saudi Riyal (SR)	SR
41	38	US Dollar ($)	$
42	38	Euro (€)	€
43	38	UAE Dirham (AED)	AED
44	42	Touch Screen (Restaurant)	touch_screen
45	42	Desktop	desktop
46	44	Username & Password	username_password
47	44	PIN	pin
48	45	Descending (Newest at Top)	descending
49	45	Ascending (Newest at Bottom)	ascending
50	54	Phase 1	phase1
51	54	Phase 2	phase2
52	56	Sandbox	sandbox
53	56	Production	production
\.


--
-- Data for Name: settings; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.settings (id, store_id, category_id, name, code, type, value, default_value, description, is_active) FROM stdin;
1	\N	1	Print Customer Name	print_cus_name	boolean	1	1	Print Customer Name on Print	t
2	\N	1	Print KOT	print_kot	boolean	1	1	Print Kitchen Order Ticket (KOT)	t
6	\N	1	Receipt Font Size	receipt_font_size	number	16	16	\N	t
7	\N	1	Receipt Logo Width	receipt_logo_width	number	100	100	Width of the branch logo on printed receipts (in pixels)	t
8	\N	5	Barcode Logo Width	barcode_logo_width	number	80	80	Width of the branch logo on printed barcodes (in pixels)	t
9	\N	5	Display Barcode Logo	barcode_logo_display	boolean	0	1	Show or hide the branch logo on printed barcodes	t
10	\N	6	Show Material Items on POS	show_material_items_on_pos	boolean	0	0	Show material items on POS item list	t
11	\N	7	System Timezone	system_timezone	select	Asia/Karachi	Asia/Karachi	Set the timezone for all date and time operations in the system. This affects reports, logs, and all time-sensitive operations.	t
12	\N	7	Date Display Format	date_display_format	select	Y-m-d	Y-m-d	Choose how dates are displayed throughout the system (YYYY-MM-DD, DD/MM/YYYY, etc.)	t
14	\N	6	Enable Kitchen Display System	enable_kds	boolean	1	1	Enable Kitchen Display System for order management	t
15	\N	6	KDS Auto Refresh	kds_auto_refresh	boolean	1	1	Enable automatic refresh for KDS screens	t
16	\N	6	KDS Sound Notifications	kds_sound_notifications	boolean	1	1	Enable sound notifications for new orders	t
20	\N	10	KDS Record Retention Days	kds_record_retention_days	number	7	7	Number of days to keep KDS records before automatic cleanup (1-90 days)	t
21	\N	10	Enable KDS Auto Cleanup	kds_auto_cleanup_enabled	boolean	1	1	Enable automatic cleanup of old KDS records	t
22	\N	10	KDS Last Cleanup Date	kds_last_cleanup_date	text			Timestamp of last KDS cleanup operation (system managed)	f
23	\N	1	Print Customer Number	print_cus_number	boolean	1	1	Print Customer Phone Number on Print	t
24	\N	1	Print Customer Address	print_cus_address	boolean	1	1	Print Customer Address on Print	t
25	\N	1	Dealer Branding	dealer_branding	text	www.itresources.com.pk	www.itresources.com.pk	Dealer company name and contact info for receipt footer	t
26	\N	1	Print Date and Time	print_datetime	boolean	1	1	Display date and time on printed receipts	t
27	\N	1	Print Remarks	print_remarks	boolean	1	1	Display remarks/notes on printed receipts	t
28	\N	1	Print Method	print_method	select	popup	popup	Choose print method: Popup (browser dialog) or Direct (use configured devices)	t
29	\N	1	Global Print Mode	global_print_mode	select	ask	ask	Global print behavior: Ask (prompt user), Auto (direct print), No (no print)	t
30	\N	7	Default Language	default_language	select	en	en	Default system language	t
31	\N	7	Language Switcher	language_switcher_enabled	boolean	1	1	Enable language switcher in header	t
32	\N	7	RTL Support	rtl_support_enabled	boolean	1	1	Enable RTL (Right-to-Left) support	t
33	\N	11	Enable Expense Approval	expense_approval_enabled	boolean	0	0	When enabled, all new expenses will require approval before being processed	t
34	\N	9	Discount Tax Sequence	discount_tax_sequence	select	after_tax	before_tax	Choose whether discounts apply before GST (reduce taxable base) or after GST (on tax-inclusive total).	t
35	\N	1	Receipt Print Format	receipt_print_format	select	thermal	thermal	Choose receipt print format: Thermal (80mm) or A4 (Letter Size)	t
36	\N	1	Print Complete Shift Summary Report	print_complete_shift_summary	boolean	0	0	When enabled, prints the complete detailed shift summary report. When disabled (default), prints a short condensed summary.	t
37	\N	1	Print Customer Previous Balance	print_cus_previous_balance	boolean	0	0	When enabled, the receipt will display the customer's outstanding balance/dues before the current transaction	t
38	\N	7	System Currency	system_currency	select	Rs	Rs	Select the default currency symbol to be used throughout the system	t
39	\N	1	KOT Font Size	kot_font_size	number	10	10	Font size for Kitchen Order Tickets (KOT) when printing to LAN printers	t
40	\N	6	Subcategory Font Size	pos_subcategory_font_size	number	16	16	Font size for subcategory text displayed in POS (in pixels, recommended: 14-20)	t
41	\N	4	Catering	catering	boolean	0	1	Enable Catering orders	t
43	\N	6	Display Order Taker Selection	pos_display_order_taker	boolean	1	0	Enable to show order taker selection dropdown on POS (appears next to customer selection)	t
44	\N	7	Login Authentication Method	login_authentication_method	select	username_password	username_password	Choose the authentication method for user login: Username/Password or PIN	t
45	\N	6	List Item Order	pos_list_item_order	select	descending	descending	Select the order in which items appear in the POS list: Descending (newest at top) or Ascending (newest at bottom)	t
46	\N	4	Display Number of Guests (Dine-In)	dine_in_show_number_of_guests	boolean	0	1	When enabled, selecting a dine-in table will ask for number of guests and display it. When disabled, the prompt and guest count are hidden.	t
48	\N	6	Reset invoice number on new shift	pos_reset_invoice_on_shift_start	boolean	0	0	When enabled, invoice count starts from 1 (e.g. INV-000001) each time a new shift is opened. When disabled, invoice numbers continue in sequence across shifts.	t
13	\N	6	Display Images on POS	display_images_on_pos	boolean	0	1	Show product images on POS item cards	t
18	\N	9	Show Payment Method Tax Rates	show_payment_method_tax_rates	boolean	0	1	Display tax rates for different payment methods on POS interface	t
19	\N	9	Enable Tax Preview on Payment Selection	enable_tax_preview_on_payment	boolean	0	1	Show updated tax amount when payment method is selected (for payment method tax mode)	t
5	\N	4	Delivery	delivery	boolean	0	1	Delivery Orders	t
4	\N	4	Take Away	take_away	boolean	1	1	Enable Take Away orders	t
17	\N	9	Tax Calculation Method	tax_calculation_method	select	item_wise	item_wise	Choose how taxes are calculated: item-wise (per item) or payment method based (uniform rate per payment type)	t
3	\N	4	Dine In	dine_in	boolean	1	1	Enable Dine In for table Orders	t
49	\N	11	Enable Financials (GL)	financials_enabled	boolean	1	1	When enabled, the system creates and posts journal entries (double-entry) for sales, purchases, expenses, payments, transfers, and adjustments. When disabled, day-to-day operations continue without writing to the general ledger.	t
50	\N	1	Invoice Footer Note	invoice_footer_note	text			Optional note shown at the bottom of invoices and receipts (thermal, A4, POS preview, LAN/USB). Use multiple lines if needed.	t
52	\N	13	Send sales invoice via WhatsApp	pos_whatsapp_invoice_enabled	boolean	1	0	When enabled, the WhatsApp invoice button appears on the POS after payment so staff can send the invoice text to the customer.	t
53	\N	13	Customer ledger on WhatsApp	whatsapp_customer_ledger_enabled	boolean	1	0	When enabled, staff can send the customer account ledger as a WhatsApp message from the Customer Ledger screen.	t
54	\N	12	ZATCA Mode	zatca_mode	select	phase2	phase1	ZATCA integration mode: phase1 or phase2	t
55	\N	12	Enable ZATCA Phase 2	zatca_phase2_enabled	boolean	0	0	Enable Phase 2 (clearance/reporting)	t
56	\N	12	ZATCA Phase 2 Environment	zatca_phase2_environment	select	sandbox	sandbox	sandbox or production environment	t
57	\N	12	Enable ZATCA Phase 2 Worker	zatca_phase2_worker_enabled	boolean	1	1	Enable background worker for retries/reporting	t
58	\N	12	ZATCA Retry Delay Seconds	zatca_phase2_retry_delay_seconds	number	120	120	Base retry delay in seconds	t
59	\N	12	ZATCA Max Retries	zatca_phase2_max_retries	number	8	8	Maximum retries for failed submissions	t
60	\N	12	ZATCA Reporting SLA Hours	zatca_phase2_reporting_sla_hours	number	24	24	Simplified invoice reporting deadline in hours	t
61	\N	12	ZATCA Phase 2 API Base URL	zatca_phase2_api_base_url	text	https://sandbox.fatoora.zatca.gov.sa	https://sandbox.fatoora.zatca.gov.sa	Base URL for ZATCA Phase 2 APIs	t
62	\N	12	ZATCA Phase 2 API Token	zatca_phase2_api_token	text			Authorization token/credential for ZATCA APIs	t
63	\N	12	ZATCA Clearance Endpoint	zatca_phase2_clearance_endpoint	text	/api/v1/invoices/clearance/single	/api/v1/invoices/clearance/single	Endpoint path for standard invoice clearance	t
64	\N	12	ZATCA Reporting Endpoint	zatca_phase2_reporting_endpoint	text	/api/v1/invoices/reporting/single	/api/v1/invoices/reporting/single	Endpoint path for simplified invoice reporting	t
65	\N	12	ZATCA Device Identifier	zatca_phase2_device_identifier	text			Optional fixed EGS device identifier for hash chain	t
66	\N	1	Print Logo	print_logo	boolean	1	1	When enabled, the receipt prints logo; when disabled, logo is hidden.	t
67	\N	6	Display shift summary before shift close	pos_display_shift_summary_before_close	boolean	0	1	When enabled, the cashier reviews expected cash and discrepancy before confirming shift close. When disabled, the shift closes after entering closing cash and the full summary is shown afterward.	t
42	\N	6	POS Screen Type	pos_screen_type	select	desktop	touch_screen	Select POS interface type: Touch Screen (restaurant) shows categories/subcategories, Desktop shows search bar	t
47	\N	1	Next Invoice Number	next_invoice_number	number	1729	1	Internal: next sequential invoice number (do not edit manually)	f
\.


--
-- Data for Name: shift_logs; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.shift_logs (id, store_id, shift_id, action_type, amount, note, created_at) FROM stdin;
\.


--
-- Data for Name: shifts; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.shifts (id, store_id, branch_id, user_id, start_time, end_time, opening_cash, closing_cash, expected_cash, actual_cash, discrepancy, status) FROM stdin;
\.


--
-- Data for Name: stock_adjustment_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.stock_adjustment_items (id, adjustment_id, item_id, item_name, current_quantity, adjustment_quantity, new_quantity, cost_price, current_stock_value, adjustment_value, new_stock_value) FROM stdin;
\.


--
-- Data for Name: stock_adjustments; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.stock_adjustments (id, adjustment_number, store_id, adjustment_date, total_items, total_adjustment_value, total_current_stock_value, total_new_stock_value, remarks, created_by, journal_entry_id, created_at) FROM stdin;
\.


--
-- Data for Name: stock_transfer_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.stock_transfer_items (id, to_store_id, from_store_id, transfer_id, item_id, item_name, quantity, cost_price, remarks) FROM stdin;
\.


--
-- Data for Name: stock_transfers; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.stock_transfers (id, transfer_number, from_store_id, to_store_id, transfer_date, status, total_items, total_quantity, notes, requested_by, approved_by, received_by, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: store_inventory; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.store_inventory (id, store_id, item_id, quantity, last_updated) FROM stdin;
\.


--
-- Data for Name: stores; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.stores (id, branch_id, store_name, store_code, address, phone, email, manager_name, is_active, is_default, created_at) FROM stdin;
\.


--
-- Data for Name: sub_categories; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.sub_categories (id, category_id, name, display_color) FROM stdin;
\.


--
-- Data for Name: subscription_plans; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.subscription_plans (id, store_id, name, billing_interval, is_active, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: sup_outstanding; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.sup_outstanding (id, purchase_id, vendor_id, amount, status, created_at) FROM stdin;
\.


--
-- Data for Name: sup_payments; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.sup_payments (id, store_id, vendor_id, purchase_id, balance_entry_id, amount_paid, discount_amount, withholding_rate, withholding_amount, gross_settlement_amount, net_cash_paid, payment_date, remarks) FROM stdin;
\.


--
-- Data for Name: supplier_balance_entries; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.supplier_balance_entries (id, entry_number, vendor_id, store_id, entry_type, amount, remaining_amount, reference_no, remarks, map_account_id, journal_entry_id, status, created_by, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: sync_settings; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.sync_settings (id, sync_allow, db_prefix, sync_mode, server_name, database_name, username, password, last_sync_date, sync_status, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: table_transfer_logs; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.table_transfer_logs (id, source_table_id, target_table_id, hold_order_id, transferred_by, transfer_type, created_at) FROM stdin;
\.


--
-- Data for Name: tax_rates; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.tax_rates (id, name, rate) FROM stdin;
1	GST	18.00
2	VAT	15.00
\.


--
-- Data for Name: terminals; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.terminals (id, terminal_name, computer_name, ip_address, terminal_type, branch_id, store_id, description, is_active, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: translations; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.translations (id, language_code, key, value, context, created_at, updated_at) FROM stdin;
1	en	dashboard	Dashboard	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
2	en	sales	Sales	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
3	en	purchases	Purchases	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
4	en	inventory	Inventory	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
5	en	reports	Reports	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
6	en	settings	Settings	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
7	en	users	Users	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
8	en	customers	Customers	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
9	en	suppliers	Suppliers	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
10	en	items	Items	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
11	en	categories	Categories	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
12	en	language_management	Language Management	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
13	en	features	Features	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
14	en	license_info	License Info	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
15	en	new_features	New Features	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
16	en	check_updates	Check For Updates	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
17	en	apply_update	Apply Update	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
18	en	item_modifiers	Item Modifiers	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
19	en	void_reasons	Void Reasons	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
20	en	quotations	Quotations	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
21	en	tables	Tables	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
22	en	floors	Floors	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
23	en	unit_of_measurement	Unit Of Measurement	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
24	en	stock_transfer	Stock Transfer	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
25	en	new_transfer_request	New Transfer Request	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
26	en	transfer_approval	Transfer Approval	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
27	en	stock_adjustment	Stock Adjustment	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
28	en	new_adjustment	New Adjustment	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
29	en	production	Production	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
30	en	users_permissions	Users & Permissions	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
31	en	order_takers	Order Takers	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
32	en	riders	Riders	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
33	en	delivery_orders	Delivery Orders	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
34	en	expense_list	Expense List	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
35	en	general_settings	General Settings	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
36	en	branch_settings	Branch Settings	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
37	en	store_management	Store Management	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
38	en	tax_rate	Tax Rate	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
39	en	add_new	Add New	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
40	en	edit	Edit	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
41	en	delete	Delete	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
42	en	save	Save	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
43	en	cancel	Cancel	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
44	en	search	Search	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
45	en	filter	Filter	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
46	en	export	Export	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
47	en	import	Import	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
48	en	update_translation	Update Translation	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
49	en	add_translation	Add Translation	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
50	en	update	Update	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
51	en	skip	Skip	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
52	en	void_order	Void Order	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
53	en	confirm	Confirm	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
54	en	close	Close	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
55	en	submit	Submit	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
56	en	reset	Reset	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
57	en	back	Back	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
58	en	next	Next	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
59	en	previous	Previous	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
60	en	finish	Finish	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
61	en	current_language	Current Language	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
62	en	available_languages	Available Languages	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
63	en	translation_key	Translation Key	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
64	en	translation_value	Translation Value	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
65	en	rtl_support	RTL Support	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
66	en	language_switcher	Language Switcher	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
67	en	context	Context	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
68	en	name	Name	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
69	en	email	Email	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
70	en	phone	Phone	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
71	en	address	Address	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
72	en	status	Status	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
73	en	actions	Actions	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
74	en	price	Price	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
75	en	quantity	Quantity	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
76	en	total	Total	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
77	en	subtotal	Net Total	labels	2025-11-05 22:16:29	2026-02-17 20:01:22
78	en	tax	Tax	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
79	en	discount	Discount	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
80	en	grand_total	Grand Total	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
81	en	order_list	Order List	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
82	en	delivery_charges	Delivery Charges	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
83	en	notes	Notes	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
84	en	translation_updated	Translation updated successfully	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
85	en	translation_added	Translation added successfully	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
86	en	invalid_language	Invalid language selected	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
87	en	success	Success	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
88	en	error	Error	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
89	en	warning	Warning	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
90	en	info	Information	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
91	en	confirm_delete	Are you sure you want to delete this item?	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
92	en	confirm_void	Are you sure you want to void this order?	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
93	en	no_data_found	No data found	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
94	en	loading	Loading...	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
95	en	please_wait	Please wait...	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
96	en	search_product	Search product...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
97	en	enter_notes	Enter any additional notes...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
98	en	enter_name	Enter name...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
99	en	enter_email	Enter email...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
100	en	enter_phone	Enter phone...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
101	en	enter_address	Enter address...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
102	en	enter_price	Enter price...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
103	en	enter_quantity	Enter quantity...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
104	en	manage_customers	Manage your customers	page_titles	2025-11-05 22:16:29	2025-11-05 22:16:29
105	en	manage_system_languages	Manage system languages and translations	page_titles	2025-11-05 22:16:29	2025-11-05 22:16:29
106	en	click_category_settings	Click a category to load its settings	page_titles	2025-11-05 22:16:29	2025-11-05 22:16:29
107	en	expenses	Expenses	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
108	en	expense_accounts	Expense Accounts	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
109	en	expense_categories	Expense Categories	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
110	en	accounts	Accounts	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
111	en	bank_accounts	Bank Accounts	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
112	en	payments	Payments	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
113	en	customer_payments	Customer Payments	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
114	en	supplier_payments	Supplier Payments	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
115	en	payment_methods	Payment Methods	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
116	en	financials	Financials	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
117	en	chart_of_accounts	Chart of Accounts	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
118	en	account_mappings	Account Mappings	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
119	en	journal_entries	Journal Entries	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
120	en	financial_periods	Financial Periods	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
121	en	trial_balance	Trial Balance	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
122	en	general_ledger	General Ledger	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
123	en	profit_loss	Profit & Loss	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
124	en	financial_reports	Financial Reports	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
125	en	hardware_devices	Hardware & Devices	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
126	en	print_devices	Print Devices	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
127	en	kds	KOT/KDS	navigation	2025-11-05 22:16:29	2025-11-05 22:16:51
128	en	tablet_orders	Tablet Orders	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
129	en	database_backup	Database Backup	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
130	en	backup_management	Backup Management	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
131	en	restore_database	Restore Database	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
132	en	all	All	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
133	en	clear	Clear	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
134	en	navigation	Navigation	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
135	en	buttons	Buttons	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
136	en	labels	Labels	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
137	en	messages	Messages	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
138	en	placeholders	Placeholders	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
139	en	page_titles	Page Titles	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
140	en	sales_report	Sales Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
141	en	invoice_report	Invoice Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
142	en	invoice_wise_profit_report	Invoice Wise Profit Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
143	en	sale_return_report	Sale Return Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
144	en	day_wise_sale_summary	Day Wise Sale Summary	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
145	en	item_wise_sales_report	Item Wise Sales Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
146	en	item_modifier_report	Item Modifier Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
147	en	cashier_shift_report	Cashier Shift Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
148	en	tax_wise_report	Tax Wise Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
149	en	order_taker_report	Order Taker Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
150	en	void_orders_report	Void Orders Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
151	en	purchase_report	Purchase Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
152	en	stock_balance_report	Stock Balance Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
153	en	stock_valuation_report	Stock Valuation Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
154	en	item_ledger_report	Item Ledger Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
155	en	production_report	Production Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
156	en	purchase_return_report	Purchase Return Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
157	en	customer_ledger	Customer Ledger	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
158	en	customer_statement	Customer Statement	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
159	en	supplier_ledger	Supplier Ledger	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
160	en	supplier_statement	Supplier Statement	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
161	en	profit_loss_report	Net Profit Analysis	navigation	2025-11-05 22:16:29	2025-11-05 22:16:45
162	en	account_ledger	Account Ledger	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
163	en	accounts_report	Accounts Report	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
164	fa	dashboard	داشبورد	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
165	fa	sales	فروش	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
166	fa	purchases	خرید	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
167	fa	inventory	موجودی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
168	fa	reports	گزارشات	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
169	fa	settings	تنظیمات	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
170	fa	users	کاربران	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
171	fa	customers	مشتریان	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
172	fa	suppliers	تامین کنندگان	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
173	fa	items	اقلام	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
174	fa	categories	دسته بندی ها	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
175	fa	language_management	مدیریت زبان	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
176	fa	features	ویژگی ها	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
177	fa	license_info	اطلاعات مجوز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
178	fa	new_features	ویژگی های جدید	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
179	fa	check_updates	بررسی به روزرسانی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
180	fa	apply_update	اعمال به روزرسانی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
181	fa	item_modifiers	تغییرات اقلام	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
182	fa	void_reasons	دلایل لغو	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
183	fa	quotations	پیش فاکتورها	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
184	fa	tables	جداول	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
185	fa	floors	طبقات	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
186	fa	unit_of_measurement	واحد اندازه گیری	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
187	fa	stock_transfer	انتقال موجودی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
188	fa	new_transfer_request	درخواست انتقال جدید	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
189	fa	transfer_approval	تایید انتقال	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
190	fa	stock_adjustment	تنظیم موجودی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
191	fa	new_adjustment	تنظیم جدید	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
192	fa	production	تولید	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
193	fa	users_permissions	کاربران و مجوزها	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
194	fa	order_takers	گیرندگان سفارش	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
195	fa	riders	رانندگان	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
196	fa	delivery_orders	سفارشات تحویل	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
197	fa	expense_list	لیست هزینه ها	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
198	fa	general_settings	تنظیمات عمومی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
199	fa	branch_settings	تنظیمات شعبه	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
200	fa	store_management	مدیریت فروشگاه	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
201	fa	tax_rate	نرخ مالیات	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
202	fa	add_new	افزودن جدید	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
203	fa	edit	ویرایش	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
204	fa	delete	حذف	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
205	fa	save	ذخیره	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
206	fa	cancel	لغو	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
207	fa	search	جستجو	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
208	fa	filter	فیلتر	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
209	fa	export	صادرات	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
210	fa	import	واردات	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
211	fa	update_translation	به روزرسانی ترجمه	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
212	fa	add_translation	افزودن ترجمه	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
213	fa	update	به روزرسانی	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
214	fa	skip	رد کردن	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
215	fa	void_order	لغو سفارش	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
216	fa	confirm	تایید	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
217	fa	close	بستن	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
218	fa	submit	ارسال	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
219	fa	reset	بازنشانی	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
220	fa	back	بازگشت	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
221	fa	next	بعدی	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
222	fa	previous	قبلی	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
223	fa	finish	پایان	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
224	fa	current_language	زبان فعلی	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
225	fa	available_languages	زبان های موجود	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
226	fa	translation_key	کلید ترجمه	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
227	fa	translation_value	مقدار ترجمه	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
228	fa	rtl_support	پشتیبانی راست به چپ	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
229	fa	language_switcher	تعویض زبان	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
230	fa	context	متن	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
231	fa	name	نام	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
232	fa	email	ایمیل	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
233	fa	phone	تلفن	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
234	fa	address	آدرس	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
235	fa	status	وضعیت	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
236	fa	actions	اقدامات	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
237	fa	price	قیمت	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
238	fa	quantity	تعداد	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
239	fa	total	مجموع	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
240	fa	subtotal	مجموع خالص	labels	2025-11-05 22:16:29	2026-02-17 20:01:22
241	fa	tax	مالیات	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
242	fa	discount	تخفیف	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
243	fa	grand_total	مجموع کل	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
244	fa	order_list	لیست سفارشات	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
245	fa	delivery_charges	هزینه تحویل	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
246	fa	notes	یادداشت ها	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
247	fa	translation_updated	ترجمه با موفقیت به روزرسانی شد	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
248	fa	translation_added	ترجمه با موفقیت افزوده شد	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
249	fa	invalid_language	زبان انتخاب شده نامعتبر است	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
250	fa	success	موفقیت	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
251	fa	error	خطا	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
252	fa	warning	هشدار	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
253	fa	info	اطلاعات	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
254	fa	confirm_delete	آیا مطمئن هستید که می خواهید این مورد را حذف کنید؟	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
255	fa	confirm_void	آیا مطمئن هستید که می خواهید این سفارش را لغو کنید؟	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
256	fa	no_data_found	داده ای یافت نشد	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
257	fa	loading	در حال بارگذاری...	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
258	fa	please_wait	لطفا صبر کنید...	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
259	fa	search_product	جستجوی محصول...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
260	fa	enter_notes	یادداشت های اضافی وارد کنید...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
261	fa	enter_name	نام وارد کنید...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
262	fa	enter_email	ایمیل وارد کنید...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
263	fa	enter_phone	تلفن وارد کنید...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
264	fa	enter_address	آدرس وارد کنید...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
265	fa	enter_price	قیمت وارد کنید...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
266	fa	enter_quantity	تعداد وارد کنید...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
267	fa	manage_customers	مدیریت مشتریان خود	page_titles	2025-11-05 22:16:29	2025-11-05 22:16:29
268	fa	manage_system_languages	مدیریت زبان های سیستم و ترجمه ها	page_titles	2025-11-05 22:16:29	2025-11-05 22:16:29
269	fa	click_category_settings	برای بارگذاری تنظیمات روی دسته کلیک کنید	page_titles	2025-11-05 22:16:29	2025-11-05 22:16:29
270	fa	expenses	هزینه ها	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
271	fa	expense_accounts	حساب های هزینه	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
272	fa	expense_categories	دسته بندی های هزینه	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
273	fa	accounts	حساب ها	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
274	fa	bank_accounts	حساب های بانکی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
275	fa	payments	پرداخت ها	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
276	fa	customer_payments	پرداخت های مشتری	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
277	fa	supplier_payments	پرداخت های تامین کننده	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
278	fa	payment_methods	روش های پرداخت	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
279	fa	financials	مالی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
280	fa	chart_of_accounts	نمودار حساب ها	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
281	fa	account_mappings	نگاشت حساب ها	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
282	fa	journal_entries	ورودی های دفتر روزنامه	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
283	fa	financial_periods	دوره های مالی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
284	fa	trial_balance	تراز آزمایشی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
285	fa	general_ledger	دفتر کل عمومی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
286	fa	profit_loss	سود و زیان	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
287	fa	financial_reports	گزارشات مالی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
288	fa	hardware_devices	سخت‌افزار و دستگاه‌ها	navigation	2025-11-05 22:16:29	2025-11-05 22:16:45
289	fa	print_devices	دستگاه های چاپ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
290	fa	kds	KOT/KDS	navigation	2025-11-05 22:16:29	2025-11-05 22:16:51
291	fa	tablet_orders	سفارشات تبلت	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
292	fa	database_backup	پشتیبان گیری پایگاه داده	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
293	fa	backup_management	مدیریت پشتیبان گیری	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
294	fa	restore_database	بازیابی پایگاه داده	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
295	fa	all	همه	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
296	fa	clear	پاک کردن	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
297	fa	navigation	ناوبری	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
298	fa	buttons	دکمه ها	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
299	fa	labels	برچسب ها	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
300	fa	messages	پیام ها	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
301	fa	placeholders	متن های راهنما	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
302	fa	page_titles	عنوان های صفحه	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
303	fa	sales_report	گزارش فروش	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
304	fa	invoice_report	گزارش فاکتور	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
305	fa	invoice_wise_profit_report	گزارش سود بر اساس فاکتور	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
306	fa	sale_return_report	گزارش برگشت فروش	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
307	fa	day_wise_sale_summary	خلاصه فروش روزانه	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
308	fa	item_wise_sales_report	گزارش فروش بر اساس آیتم	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
309	fa	item_modifier_report	گزارش اصلاحات آیتم	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
310	fa	cashier_shift_report	گزارش شیفت صندوق دار	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
311	fa	tax_wise_report	گزارش بر اساس مالیات	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
312	fa	order_taker_report	گزارش دریافت کننده سفارش	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
313	fa	void_orders_report	گزارش سفارشات لغو شده	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
314	fa	purchase_report	گزارش خرید	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
315	fa	stock_balance_report	گزارش موجودی انبار	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
316	fa	stock_valuation_report	گزارش ارزش گذاری موجودی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
317	fa	item_ledger_report	گزارش دفتر آیتم	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
318	fa	production_report	گزارش تولید	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
319	fa	purchase_return_report	گزارش برگشت خرید	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
320	fa	customer_ledger	دفتر مشتری	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
321	fa	customer_statement	صورت حساب مشتری	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
322	fa	supplier_ledger	دفتر تامین کننده	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
323	fa	supplier_statement	صورت حساب تامین کننده	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
324	fa	profit_loss_report	تحلیل سود خالص	navigation	2025-11-05 22:16:29	2025-11-05 22:16:45
325	fa	account_ledger	دفتر حساب	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
326	fa	accounts_report	گزارش حساب ها	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
327	ur	dashboard	ڈیش بورڈ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
328	ur	sales	سیلز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
329	ur	purchases	خریداری	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
330	ur	inventory	انوینٹری	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
331	ur	reports	رپورٹس	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
332	ur	settings	سیٹنگز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
333	ur	users	صارفین	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
334	ur	customers	کسٹمرز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
335	ur	suppliers	سپلائرز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
336	ur	items	آئٹمز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
337	ur	categories	کیٹگریز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
338	ur	language_management	زبان کا انتظام	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
339	ur	features	فیچرز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
340	ur	license_info	لائسنس کی معلومات	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
341	ur	new_features	نئے فیچرز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
342	ur	check_updates	اپڈیٹ چیک کریں	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
343	ur	apply_update	اپڈیٹ لاگو کریں	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
344	ur	item_modifiers	آئٹم موڈیفائرز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
345	ur	void_reasons	کینسل کرنے کی وجوہات	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
346	ur	quotations	کوٹیشنز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
347	ur	tables	ٹیبلز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
348	ur	floors	فلورز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
349	ur	unit_of_measurement	پیمائش کی اکائی	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
350	ur	stock_transfer	اسٹاک ٹرانسفر	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
351	ur	new_transfer_request	نیا ٹرانسفر درخواست	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
352	ur	transfer_approval	ٹرانسفر کی منظوری	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
353	ur	stock_adjustment	اسٹاک ایڈجسٹمنٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
354	ur	new_adjustment	نیا ایڈجسٹمنٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
355	ur	production	پروڈکشن	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
356	ur	users_permissions	صارفین اور اجازتیں	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
357	ur	order_takers	آرڈر لینے والے	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
358	ur	riders	رائیڈرز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
359	ur	delivery_orders	ڈیلیوری آرڈرز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
360	ur	expense_list	خرچوں کی فہرست	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
361	ur	general_settings	جنرل سیٹنگز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
362	ur	branch_settings	برانچ سیٹنگز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
363	ur	store_management	اسٹور مینجمنٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
364	ur	tax_rate	ٹیکس کی شرح	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
365	ur	add_new	نیا شامل کریں	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
366	ur	edit	ایڈٹ	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
367	ur	delete	ڈیلیٹ	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
368	ur	save	سیو	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
369	ur	cancel	کینسل	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
370	ur	search	سرچ	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
371	ur	filter	فلٹر	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
372	ur	export	ایکسپورٹ	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
373	ur	import	امپورٹ	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
374	ur	update_translation	ترجمہ اپڈیٹ کریں	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
375	ur	add_translation	ترجمہ شامل کریں	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
376	ur	update	اپڈیٹ	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
377	ur	skip	سکیپ	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
378	ur	void_order	آرڈر کینسل کریں	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
379	ur	confirm	کنفرم	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
380	ur	close	بند کریں	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
381	ur	submit	سبمٹ	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
382	ur	reset	ری سیٹ	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
383	ur	back	واپس	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
384	ur	next	اگلا	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
385	ur	previous	پچھلا	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
386	ur	finish	ختم	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
387	ur	current_language	موجودہ زبان	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
388	ur	available_languages	دستیاب زبانیں	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
389	ur	translation_key	ترجمہ کی کلید	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
390	ur	translation_value	ترجمہ کی قیمت	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
391	ur	rtl_support	RTL سپورٹ	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
392	ur	language_switcher	زبان سوئچر	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
393	ur	context	سیاق و سباق	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
394	ur	name	نام	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
395	ur	email	ای میل	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
396	ur	phone	فون	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
397	ur	address	پتہ	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
398	ur	status	حالت	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
399	ur	actions	اعمال	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
400	ur	price	قیمت	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
401	ur	quantity	مقدار	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
402	ur	total	کل	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
403	ur	subtotal	خالص کل	labels	2025-11-05 22:16:29	2026-02-17 20:01:22
404	ur	tax	ٹیکس	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
405	ur	discount	ڈسکاؤنٹ	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
406	ur	grand_total	گرینڈ ٹوٹل	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
407	ur	order_list	آرڈر کی فہرست	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
408	ur	delivery_charges	ڈیلیوری چارجز	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
409	ur	notes	نوٹس	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
410	ur	translation_updated	ترجمہ کامیابی سے اپڈیٹ ہو گیا	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
411	ur	translation_added	ترجمہ کامیابی سے شامل ہو گیا	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
412	ur	invalid_language	غلط زبان منتخب کی گئی	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
413	ur	success	کامیابی	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
414	ur	error	خرابی	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
415	ur	warning	انتباہ	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
416	ur	info	معلومات	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
417	ur	confirm_delete	کیا آپ واقعی اس آئٹم کو ڈیلیٹ کرنا چاہتے ہیں؟	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
418	ur	confirm_void	کیا آپ واقعی اس آرڈر کو کینسل کرنا چاہتے ہیں؟	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
419	ur	no_data_found	کوئی ڈیٹا نہیں ملا	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
420	ur	loading	لوڈ ہو رہا ہے...	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
421	ur	please_wait	براہ کرم انتظار کریں...	messages	2025-11-05 22:16:29	2025-11-05 22:16:29
422	ur	search_product	پروڈکٹ تلاش کریں...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
423	ur	enter_notes	اضافی نوٹس درج کریں...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
424	ur	enter_name	نام درج کریں...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
425	ur	enter_email	ای میل درج کریں...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
426	ur	enter_phone	فون درج کریں...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
427	ur	enter_address	پتہ درج کریں...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
428	ur	enter_price	قیمت درج کریں...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
429	ur	enter_quantity	مقدار درج کریں...	placeholders	2025-11-05 22:16:29	2025-11-05 22:16:29
430	ur	manage_customers	اپنے کسٹمرز کا انتظام کریں	page_titles	2025-11-05 22:16:29	2025-11-05 22:16:29
431	ur	manage_system_languages	سسٹم کی زبانیں اور تراجم کا انتظام کریں	page_titles	2025-11-05 22:16:29	2025-11-05 22:16:29
432	ur	click_category_settings	سیٹنگز لوڈ کرنے کے لیے کیٹگری پر کلک کریں	page_titles	2025-11-05 22:16:29	2025-11-05 22:16:29
433	ur	expenses	خرچے	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
434	ur	expense_accounts	خرچے کے اکاؤنٹس	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
435	ur	expense_categories	خرچے کی کیٹگریز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
436	ur	accounts	اکاؤنٹس	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
437	ur	bank_accounts	بینک اکاؤنٹس	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
438	ur	payments	پیمنٹس	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
439	ur	customer_payments	کسٹمر پیمنٹس	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
440	ur	supplier_payments	سپلائر پیمنٹس	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
441	ur	payment_methods	پیمنٹ کے طریقے	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
442	ur	financials	مالیات	navigation	2025-11-05 22:16:29	2025-11-05 22:16:45
443	ur	chart_of_accounts	اکاؤنٹس کا چارٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
444	ur	account_mappings	اکاؤنٹ میپنگ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
445	ur	journal_entries	جرنل انٹریز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
446	ur	financial_periods	مالی ادوار	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
447	ur	trial_balance	ٹرائل بیلنس	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
448	ur	general_ledger	جنرل لیجر	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
449	ur	profit_loss	منافع اور نقصان	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
450	ur	financial_reports	مالی رپورٹس	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
451	ur	hardware_devices	ہارڈویئر اور ڈیوائسز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
452	ur	print_devices	پرنٹ ڈیوائسز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
453	ur	kds	کچن آرڈر ٹکٹ/کچن ڈسپلے	navigation	2025-11-05 22:16:29	2025-11-05 22:16:51
454	ur	tablet_orders	ٹیبلٹ آرڈرز	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
455	ur	database_backup	ڈیٹابیس بیک اپ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
456	ur	backup_management	بیک اپ مینجمنٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
457	ur	restore_database	ڈیٹابیس ریسٹور	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
458	ur	all	سب	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
459	ur	clear	صاف کریں	buttons	2025-11-05 22:16:29	2025-11-05 22:16:29
460	ur	navigation	نیویگیشن	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
461	ur	buttons	بٹنز	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
462	ur	labels	لیبلز	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
463	ur	messages	پیغامات	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
464	ur	placeholders	پلیس ہولڈرز	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
465	ur	page_titles	صفحہ کے عنوانات	labels	2025-11-05 22:16:29	2025-11-05 22:16:29
466	ur	sales_report	سیلز رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
467	ur	invoice_report	انوائس رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
468	ur	invoice_wise_profit_report	انوائس وائز پرافٹ رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
469	ur	sale_return_report	سیل ریٹرن رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
470	ur	day_wise_sale_summary	ڈے وائز سیل سمیری	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
471	ur	item_wise_sales_report	آئٹم وائز سیلز رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
472	ur	item_modifier_report	آئٹم موڈیفائر رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
473	ur	cashier_shift_report	کیشئیر شفٹ رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
474	ur	tax_wise_report	ٹیکس وائز رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
475	ur	order_taker_report	آرڈر ٹیکر رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
476	ur	void_orders_report	وائڈ آرڈرز رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
477	ur	purchase_report	پچیز رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
478	ur	stock_balance_report	اسٹاک بیلنس رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
479	ur	stock_valuation_report	اسٹاک ویلیوایشن رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
480	ur	item_ledger_report	آئٹم لیجر رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
481	ur	production_report	پروڈکشن رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
482	ur	purchase_return_report	پچیز ریٹرن رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
483	ur	customer_ledger	کسٹمر لیجر	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
484	ur	customer_statement	کسٹمر سٹیٹمنٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
485	ur	supplier_ledger	سپلائر لیجر	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
486	ur	supplier_statement	سپلائر سٹیٹمنٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
487	ur	profit_loss_report	نیٹ پرافٹ تجزیہ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:45
488	ur	account_ledger	اکاؤنٹ لیجر	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
489	ur	accounts_report	اکاؤنٹس رپورٹ	navigation	2025-11-05 22:16:29	2025-11-05 22:16:29
490	ar	dashboard	لوحة التحكم	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
491	ar	sales	المبيعات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
492	ar	purchases	المشتريات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
493	ar	inventory	المخزون	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
494	ar	reports	التقارير	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
495	ar	settings	الإعدادات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
496	ar	users	المستخدمون	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
497	ar	customers	العملاء	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
498	ar	suppliers	الموردون	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
499	ar	items	الأصناف	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
500	ar	categories	الفئات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
501	ar	language_management	إدارة اللغات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
502	ar	features	الميزات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
503	ar	license_info	معلومات الترخيص	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
504	ar	new_features	الميزات الجديدة	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
505	ar	check_updates	فحص التحديثات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
506	ar	apply_update	تطبيق التحديث	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
507	ar	item_modifiers	معدلات الأصناف	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
508	ar	void_reasons	أسباب الإلغاء	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
509	ar	quotations	عروض الأسعار	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
510	ar	tables	الطاولات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
511	ar	floors	الطوابق	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
512	ar	unit_of_measurement	وحدة القياس	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
513	ar	stock_transfer	نقل المخزون	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
514	ar	new_transfer_request	طلب نقل جديد	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
515	ar	transfer_approval	موافقة النقل	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
516	ar	stock_adjustment	تعديل المخزون	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
517	ar	new_adjustment	تعديل جديد	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
518	ar	production	الإنتاج	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
519	ar	users_permissions	المستخدمون والصلاحيات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
520	ar	order_takers	أخذ الطلبات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
521	ar	riders	الراكبون	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
522	ar	delivery_orders	طلبات التوصيل	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
523	ar	expense_list	قائمة المصروفات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
524	ar	general_settings	الإعدادات العامة	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
525	ar	branch_settings	إعدادات الفرع	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
526	ar	store_management	إدارة المتجر	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
527	ar	tax_rate	معدل الضريبة	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
528	ar	add_new	إضافة جديد	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
529	ar	edit	تعديل	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
530	ar	delete	حذف	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
531	ar	save	حفظ	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
532	ar	cancel	إلغاء	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
533	ar	search	بحث	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
534	ar	filter	تصفية	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
535	ar	export	تصدير	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
536	ar	import	استيراد	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
537	ar	update_translation	تحديث الترجمة	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
538	ar	add_translation	إضافة ترجمة	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
539	ar	update	تحديث	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
540	ar	skip	تخطي	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
541	ar	void_order	إلغاء الطلب	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
542	ar	confirm	تأكيد	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
543	ar	close	إغلاق	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
544	ar	submit	إرسال	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
545	ar	reset	إعادة تعيين	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
546	ar	back	رجوع	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
547	ar	next	التالي	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
548	ar	previous	السابق	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
549	ar	finish	إنهاء	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
550	ar	clear	مسح	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
551	ar	current_language	اللغة الحالية	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
552	ar	available_languages	اللغات المتاحة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
553	ar	translation_key	مفتاح الترجمة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
554	ar	translation_value	قيمة الترجمة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
555	ar	rtl_support	دعم الكتابة من اليمين إلى اليسار	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
556	ar	language_switcher	مبدل اللغة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
557	ar	context	السياق	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
558	ar	name	الاسم	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
559	ar	email	البريد الإلكتروني	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
560	ar	phone	الهاتف	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
561	ar	address	العنوان	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
562	ar	status	الحالة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
563	ar	actions	الإجراءات	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
564	ar	price	السعر	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
565	ar	quantity	الكمية	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
566	ar	total	المجموع	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
567	ar	subtotal	المجموع الصافي	labels	2025-11-05 22:16:38	2026-02-17 20:01:22
568	ar	tax	الضريبة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
569	ar	discount	الخصم	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
570	ar	grand_total	المجموع الكلي	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
571	ar	order_list	قائمة الطلبات	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
572	ar	delivery_charges	رسوم التوصيل	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
573	ar	notes	ملاحظات	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
574	ar	all	الكل	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
575	ar	navigation	التنقل	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
576	ar	buttons	الأزرار	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
577	ar	labels	التسميات	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
578	ar	messages	الرسائل	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
579	ar	placeholders	النصوص التوضيحية	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
580	ar	page_titles	عناوين الصفحات	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
581	ar	translation_updated	تم تحديث الترجمة بنجاح	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
582	ar	translation_added	تم إضافة الترجمة بنجاح	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
583	ar	invalid_language	اللغة المحددة غير صحيحة	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
584	ar	success	نجح	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
585	ar	error	خطأ	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
586	ar	warning	تحذير	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
587	ar	info	معلومات	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
588	ar	confirm_delete	هل أنت متأكد من أنك تريد حذف هذا العنصر؟	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
589	ar	confirm_void	هل أنت متأكد من أنك تريد إلغاء هذا الطلب؟	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
590	ar	no_data_found	لم يتم العثور على بيانات	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
591	ar	loading	جاري التحميل...	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
592	ar	please_wait	يرجى الانتظار...	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
593	ar	search_product	البحث عن المنتج...	placeholders	2025-11-05 22:16:38	2025-11-05 22:16:38
594	ar	enter_notes	أدخل أي ملاحظات إضافية...	placeholders	2025-11-05 22:16:38	2025-11-05 22:16:38
595	ar	enter_name	أدخل الاسم...	placeholders	2025-11-05 22:16:38	2025-11-05 22:16:38
596	ar	enter_email	أدخل البريد الإلكتروني...	placeholders	2025-11-05 22:16:38	2025-11-05 22:16:38
597	ar	enter_phone	أدخل رقم الهاتف...	placeholders	2025-11-05 22:16:38	2025-11-05 22:16:38
598	ar	enter_address	أدخل العنوان...	placeholders	2025-11-05 22:16:38	2025-11-05 22:16:38
599	ar	enter_price	أدخل السعر...	placeholders	2025-11-05 22:16:38	2025-11-05 22:16:38
600	ar	enter_quantity	أدخل الكمية...	placeholders	2025-11-05 22:16:38	2025-11-05 22:16:38
601	ar	manage_customers	إدارة عملائك	page_titles	2025-11-05 22:16:38	2025-11-05 22:16:38
602	ar	manage_system_languages	إدارة لغات النظام والترجمات	page_titles	2025-11-05 22:16:38	2025-11-05 22:16:38
603	ar	click_category_settings	انقر على فئة لتحميل إعداداتها	page_titles	2025-11-05 22:16:38	2025-11-05 22:16:38
604	ar	expenses	المصروفات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
605	ar	expense_accounts	حسابات المصروفات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
606	ar	expense_categories	فئات المصروفات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
607	ar	accounts	الحسابات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
608	ar	bank_accounts	الحسابات البنكية	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
609	ar	payments	المدفوعات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
610	ar	customer_payments	مدفوعات العملاء	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
611	ar	supplier_payments	مدفوعات الموردين	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
612	ar	payment_methods	طرق الدفع	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
613	ar	financials	المالية	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
614	ar	chart_of_accounts	دليل الحسابات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
615	ar	account_mappings	ربط الحسابات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
616	ar	journal_entries	قيود اليومية	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
617	ar	financial_periods	الفترات المالية	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
618	ar	trial_balance	ميزان المراجعة	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
619	ar	general_ledger	دفتر الأستاذ العام	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
620	ar	profit_loss	الأرباح والخسائر	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
621	ar	financial_reports	التقارير المالية	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
622	ar	hardware_devices	الأجهزة والمعدات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
623	ar	print_devices	أجهزة الطباعة	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
624	ar	kds	طلب المطبخ/شاشة المطبخ	navigation	2025-11-05 22:16:38	2025-11-05 22:16:51
625	ar	tablet_orders	طلبات الأجهزة اللوحية	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
626	ar	database_backup	نسخ احتياطي لقاعدة البيانات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
627	ar	backup_management	إدارة النسخ الاحتياطية	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
628	ar	restore_database	استعادة قاعدة البيانات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
629	ar	sales_report	تقرير المبيعات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
630	ar	invoice_report	تقرير الفواتير	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
631	ar	invoice_wise_profit_report	تقرير الأرباح حسب الفاتورة	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
632	ar	sale_return_report	تقرير مرتجع المبيعات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
633	ar	day_wise_sale_summary	ملخص المبيعات اليومية	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
634	ar	item_wise_sales_report	تقرير المبيعات حسب الصنف	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
635	ar	item_modifier_report	تقرير معدلات الأصناف	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
636	ar	cashier_shift_report	تقرير نوبة الصندوق	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
637	ar	tax_wise_report	تقرير الضرائب	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
638	ar	order_taker_report	تقرير أخذ الطلبات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
639	ar	void_orders_report	تقرير الطلبات الملغاة	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
640	ar	purchase_report	تقرير المشتريات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
641	ar	stock_balance_report	تقرير رصيد المخزون	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
642	ar	stock_valuation_report	تقرير تقييم المخزون	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
643	ar	item_ledger_report	تقرير دفتر الأصناف	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
644	ar	production_report	تقرير الإنتاج	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
645	ar	purchase_return_report	تقرير مرتجع المشتريات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
646	ar	customer_ledger	دفتر العملاء	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
647	ar	customer_statement	كشف حساب العميل	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
648	ar	supplier_ledger	دفتر الموردين	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
649	ar	supplier_statement	كشف حساب المورد	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
650	ar	profit_loss_report	تحليل صافي الربح	navigation	2025-11-05 22:16:38	2025-11-05 22:16:45
651	ar	account_ledger	دفتر الحسابات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
652	ar	accounts_report	تقرير الحسابات	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
653	ar	item_cost_report	تقرير تكلفة الأصناف	navigation	2025-11-05 22:16:38	2025-11-05 22:16:38
654	ar	cost_method	طريقة التكلفة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
655	ar	average_cost	متوسط التكلفة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
656	ar	fifo_cost	تكلفة FIFO	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
657	ar	current_cost	التكلفة الحالية	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
658	ar	retail_price	سعر البيع	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
659	ar	cost_price	سعر التكلفة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
660	ar	margin	الهامش	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
661	ar	stock_value	قيمة المخزون	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
662	ar	profit_amount	مبلغ الربح	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
663	ar	profit_percentage	نسبة الربح	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
664	ar	margin_percentage	نسبة الهامش	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
665	ar	current_stock	المخزون الحالي	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
666	ar	last_movement	آخر حركة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
667	ar	show_zero_cost	إظهار التكلفة الصفرية	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
668	ar	from_date	من تاريخ	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
669	ar	to_date	إلى تاريخ	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
670	ar	pos	نقطة البيع	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
671	ar	cart	السلة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
672	ar	checkout	الدفع	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
673	ar	receipt	الإيصال	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
674	ar	invoice	الفاتورة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
675	ar	customer	العميل	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
676	ar	supplier	المورد	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
677	ar	item	الصنف	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
678	ar	category	الفئة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
679	ar	sub_category	الفئة الفرعية	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
680	ar	barcode	الباركود	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
681	ar	sku	رمز المنتج	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
682	ar	stock	المخزون	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
683	ar	material	المواد	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
684	ar	non_stock	غير مخزني	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
685	ar	bulk	الكميات الكبيرة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
686	ar	loose	مفكوك	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
687	ar	reorder_level	مستوى إعادة الطلب	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
688	ar	reorder_quantity	كمية إعادة الطلب	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
689	ar	tax_type	نوع الضريبة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
690	ar	included	مشمول	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
691	ar	excluded	غير مشمول	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
692	ar	nil	صفر	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
693	ar	add_item	إضافة صنف	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
694	ar	edit_item	تعديل الصنف	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
695	ar	delete_item	حذف الصنف	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
696	ar	view_item	عرض الصنف	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
697	ar	print_barcode	طباعة الباركود	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
698	ar	import_items	استيراد الأصناف	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
699	ar	export_items	تصدير الأصناف	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
700	ar	bulk_edit	تعديل جماعي	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
701	ar	bulk_delete	حذف جماعي	buttons	2025-11-05 22:16:38	2025-11-05 22:16:38
702	ar	required_field	هذا الحقل مطلوب	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
703	ar	invalid_email	البريد الإلكتروني غير صحيح	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
704	ar	invalid_phone	رقم الهاتف غير صحيح	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
705	ar	invalid_price	السعر غير صحيح	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
706	ar	invalid_quantity	الكمية غير صحيحة	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
707	ar	duplicate_code	الكود موجود بالفعل	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
708	ar	item_not_found	الصنف غير موجود	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
709	ar	insufficient_stock	المخزون غير كافي	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
710	ar	item_added_successfully	تم إضافة الصنف بنجاح	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
711	ar	item_updated_successfully	تم تحديث الصنف بنجاح	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
712	ar	item_deleted_successfully	تم حذف الصنف بنجاح	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
713	ar	items_imported_successfully	تم استيراد الأصناف بنجاح	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
714	ar	items_exported_successfully	تم تصدير الأصناف بنجاح	messages	2025-11-05 22:16:38	2025-11-05 22:16:38
715	ar	item_code	كود الصنف	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
716	ar	sku_number	رقم SKU	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
717	ar	item_name	اسم الصنف	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
718	ar	item_role	دور الصنف	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
719	ar	stock_item	صنف مخزني	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
720	ar	material_item	صنف مواد	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
721	ar	non_stock_item	صنف غير مخزني	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
722	ar	item_type	نوع الصنف	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
723	ar	bulk_qty	كمية الكمية الكبيرة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
724	ar	bulk_price	سعر الكمية الكبيرة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
725	ar	pkg_qty	كمية العبوة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
726	ar	product_image	صورة المنتج	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
727	ar	uom	وحدة القياس	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
728	ar	id	المعرف	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
729	ar	code	الكود	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
730	ar	image	الصورة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
731	ar	type	النوع	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
732	ar	role	الدور	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
733	ar	cost	التكلفة	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
734	ar	retail	البيع	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
735	ar	profit	الربح	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
736	ar	stock_qty	كمية المخزون	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
737	ar	created_date	تاريخ الإنشاء	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
738	ar	updated_date	تاريخ التحديث	labels	2025-11-05 22:16:38	2025-11-05 22:16:38
739	en	updates	Updates	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
740	en	users_access	Users & Access	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
741	en	help	Help	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
742	en	card_types	Card Types	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
743	en	discount_management	Discount Management	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
744	en	database_operation	Database Operation	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
745	en	sync_settings	Sync Settings	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
746	en	contact_support	Contact Support	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
747	ur	updates	اپڈیٹس	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
748	ur	users_access	صارفین اور رسائی	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
749	ur	help	مدد	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
750	ur	card_types	کارڈ اقسام	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
751	ur	discount_management	ڈسکاؤنٹ مینجمنٹ	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
752	ur	database_operation	ڈیٹا بیس آپریشن	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
753	ur	sync_settings	سنگ سیٹنگز	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
754	ur	contact_support	سپورٹ سے رابطہ کریں	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
755	fa	updates	به‌روزرسانی‌ها	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
756	fa	users_access	کاربران و دسترسی	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
757	fa	help	راهنما	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
758	fa	card_types	انواع کارت	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
759	fa	discount_management	مدیریت تخفیف	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
760	fa	database_operation	عملیات پایگاه داده	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
761	fa	sync_settings	تنظیمات همگام‌سازی	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
762	fa	contact_support	تماس با پشتیبانی	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
772	en	welcome_to	Welcome to	page_titles	2025-11-05 22:16:45	2025-11-05 22:16:45
773	en	itr_pos_by_it_resources	ITR POS by IT Resources	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
774	en	todays_gross_sales	Today's Gross Sales	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
775	en	todays_purchase	Today's Purchase	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
776	en	total_gross_sales	Total Gross Sales	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
777	en	total_expense_amount	Total Expense Amount	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
778	en	customer_outstanding	Customer Outstanding	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
779	en	supplier_outstanding	Supplier Outstanding	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
780	en	purchase_invoice	Purchase Invoice	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
781	en	sales_invoice	Sales Invoice	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
782	en	todays_deliveries	Today's Deliveries	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
783	en	pending_deliveries	Pending Deliveries	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
784	en	out_for_delivery	Out for Delivery	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
785	en	completed_deliveries	Completed Deliveries	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
786	en	top_selling_products	Top Selling Products	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
787	en	purchase_and_sales	Purchase & Sales	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
788	en	no_sales_data	No sales data available.	messages	2025-11-05 22:16:45	2025-11-05 22:16:45
789	en	cash_balance	Cash Balance	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
790	ur	welcome_to	خوش آمدید	page_titles	2025-11-05 22:16:45	2025-11-05 22:16:45
791	ur	itr_pos_by_it_resources	آئی ٹی ریسورسز کا آئی ٹی آر پی او ایس	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
792	ur	todays_gross_sales	آج کی مجموعی سیلز	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
793	ur	todays_purchase	آج کی خریداری	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
794	ur	total_gross_sales	مجموعی سیلز	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
795	ur	total_expense_amount	کل اخراجات	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
796	ur	customer_outstanding	کسٹمر واجبات	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
797	ur	supplier_outstanding	سپلائر واجبات	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
798	ur	purchase_invoice	خریداری کی رسید	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
799	ur	sales_invoice	فروخت کی رسید	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
800	ur	todays_deliveries	آج کی ڈلیوریز	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
801	ur	pending_deliveries	زیر التواء ڈلیوریز	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
802	ur	out_for_delivery	ڈلیوری کے لیے روانہ	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
803	ur	completed_deliveries	مکمل شدہ ڈلیوریز	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
804	ur	top_selling_products	سب سے زیادہ فروخت ہونے والی اشیاء	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
805	ur	purchase_and_sales	خرید و فروخت	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
806	ur	no_sales_data	کوئی سیلز ڈیٹا دستیاب نہیں۔	messages	2025-11-05 22:16:45	2025-11-05 22:16:45
807	ur	cash_balance	نقد بیلنس	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
808	fa	welcome_to	خوش آمدید به	page_titles	2025-11-05 22:16:45	2025-11-05 22:16:45
809	fa	itr_pos_by_it_resources	آی‌تی‌آر پی‌او‌اس توسط آی‌تی ریسورسز	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
810	fa	todays_gross_sales	فروش ناخالص امروز	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
811	fa	todays_purchase	خرید امروز	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
812	fa	total_gross_sales	کل فروش ناخالص	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
813	fa	total_expense_amount	مجموع هزینه‌ها	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
814	fa	customer_outstanding	مطالبات مشتری	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
815	fa	supplier_outstanding	بدهی به تامین‌کننده	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
816	fa	purchase_invoice	فاکتور خرید	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
817	fa	sales_invoice	فاکتور فروش	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
818	fa	todays_deliveries	تحویل‌های امروز	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
819	fa	pending_deliveries	تحویل‌های در انتظار	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
820	fa	out_for_delivery	ارسال برای تحویل	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
821	fa	completed_deliveries	تحویل‌های تکمیل‌شده	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
822	fa	top_selling_products	پرفروش‌ترین محصولات	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
823	fa	purchase_and_sales	خرید و فروش	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
824	fa	no_sales_data	داده‌ای برای فروش موجود نیست.	messages	2025-11-05 22:16:45	2025-11-05 22:16:45
825	fa	cash_balance	موجودی نقد	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
826	ar	updates	التحديثات	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
827	ar	users_access	المستخدمون والصلاحيات	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
828	ar	help	مساعدة	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
829	ar	card_types	أنواع البطاقات	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
830	ar	discount_management	إدارة الخصومات	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
831	ar	database_operation	عمليات قاعدة البيانات	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
832	ar	sync_settings	إعدادات المزامنة	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
833	ar	contact_support	اتصل بالدعم	navigation	2025-11-05 22:16:45	2025-11-05 22:16:45
837	ar	welcome_to	مرحبًا بك في	page_titles	2025-11-05 22:16:45	2025-11-05 22:16:45
838	ar	itr_pos_by_it_resources	نظام نقاط البيع ITR بواسطة IT Resources	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
839	ar	todays_gross_sales	إجمالي مبيعات اليوم	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
840	ar	todays_purchase	مشتريات اليوم	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
841	ar	total_gross_sales	إجمالي المبيعات	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
842	ar	total_expense_amount	إجمالي المصروفات	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
843	ar	customer_outstanding	مستحقات العملاء	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
844	ar	supplier_outstanding	مستحقات الموردين	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
845	ar	purchase_invoice	فواتير الشراء	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
846	ar	sales_invoice	فواتير البيع	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
847	ar	todays_deliveries	طلبات اليوم المُسلمة	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
848	ar	pending_deliveries	طلبات قيد التسليم	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
849	ar	out_for_delivery	خارج للتسليم	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
850	ar	completed_deliveries	طلبات مكتملة التسليم	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
851	ar	top_selling_products	المنتجات الأكثر مبيعًا	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
852	ar	purchase_and_sales	المشتريات والمبيعات	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
853	ar	no_sales_data	لا توجد بيانات مبيعات.	messages	2025-11-05 22:16:45	2025-11-05 22:16:45
854	ar	cash_balance	رصيد النقد	labels	2025-11-05 22:16:45	2025-11-05 22:16:45
855	en	opening_balances	Opening Balances	navigation	2025-11-05 22:16:46	2025-11-05 22:16:46
856	ar	opening_balances	الأرصدة الافتتاحية	navigation	2025-11-05 22:16:46	2025-11-05 22:16:46
857	ur	opening_balances	ابتدائی بیلنس	navigation	2025-11-05 22:16:46	2025-11-05 22:16:46
858	fa	opening_balances	موجودی اولیه	navigation	2025-11-05 22:16:46	2025-11-05 22:16:46
859	en	total_customer_outstanding	Total Customer Outstanding	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
860	ur	total_customer_outstanding	مجموعی کسٹمر واجبات	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
861	fa	total_customer_outstanding	کل مطالبات مشتری	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
862	ar	total_customer_outstanding	إجمالي مستحقات العملاء	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
863	en	total_supplier_outstanding	Total Supplier Outstanding	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
864	ur	total_supplier_outstanding	مجموعی سپلائر واجبات	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
865	fa	total_supplier_outstanding	کل بدهی تأمین‌کننده	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
866	ar	total_supplier_outstanding	إجمالي مستحقات الموردين	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
867	en	top_customers_sales	Top Customers Sales	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
868	ur	top_customers_sales	سرِفہرست کسٹمر سیلز	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
869	fa	top_customers_sales	پرفروش‌ترین مشتریان	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
870	ar	top_customers_sales	أعلى مبيعات العملاء	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
871	en	top_expense_categories	Top Expense Categories	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
872	ur	top_expense_categories	سرِفہرست خرچ کی کیٹگریز	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
873	fa	top_expense_categories	پراستفاده‌ترین دسته‌های هزینه	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
874	ar	top_expense_categories	أعلى فئات المصروفات	labels	2026-02-17 20:01:10	2026-02-17 20:01:10
875	en	no_customer_sales_data	No customer sales data available.	messages	2026-02-17 20:01:10	2026-02-17 20:01:10
876	ur	no_customer_sales_data	کسٹمر سیلز کا کوئی ڈیٹا دستیاب نہیں۔	messages	2026-02-17 20:01:10	2026-02-17 20:01:10
877	fa	no_customer_sales_data	داده‌ای برای فروش مشتری در دسترس نیست.	messages	2026-02-17 20:01:10	2026-02-17 20:01:10
878	ar	no_customer_sales_data	لا تتوفر بيانات مبيعات العملاء.	messages	2026-02-17 20:01:10	2026-02-17 20:01:10
879	en	no_expense_category_data	No expense category data available.	messages	2026-02-17 20:01:10	2026-02-17 20:01:10
880	ur	no_expense_category_data	خرچ کی کیٹگریز کا کوئی ڈیٹا دستیاب نہیں۔	messages	2026-02-17 20:01:10	2026-02-17 20:01:10
881	fa	no_expense_category_data	هیچ داده‌ای برای دسته‌های هزینه در دسترس نیست.	messages	2026-02-17 20:01:10	2026-02-17 20:01:10
882	ar	no_expense_category_data	لا تتوفر بيانات فئات المصروفات.	messages	2026-02-17 20:01:10	2026-02-17 20:01:10
890	en	delivery_challan	Delivery Challan	navigation	2026-02-17 20:01:10	2026-02-17 20:01:10
891	en	delivery_challan_subtitle	Generate challans for delivered invoices	navigation	2026-02-17 20:01:10	2026-02-17 20:01:10
892	en	print_selected	Print Selected	general	2026-02-17 20:01:10	2026-02-17 20:01:10
893	en	search_invoice_placeholder	Search invoice #	general	2026-02-17 20:01:10	2026-02-17 20:01:10
894	en	available_invoices	Available Invoices	general	2026-02-17 20:01:10	2026-02-17 20:01:10
895	en	records	records	general	2026-02-17 20:01:10	2026-02-17 20:01:10
896	en	delivery_address	Delivery Address	general	2026-02-17 20:01:10	2026-02-17 20:01:10
897	en	delivery_status	Delivery Status	general	2026-02-17 20:01:10	2026-02-17 20:01:10
898	en	no_invoices_found	No invoices found for the selected filters.	general	2026-02-17 20:01:10	2026-02-17 20:01:10
899	en	print_challan	Print Challan	general	2026-02-17 20:01:10	2026-02-17 20:01:10
900	en	hold_orders	Hold Orders	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
901	en	hold	Hold	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
902	en	transaction	Transaction	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
903	en	transaction_id	Transaction ID	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
904	en	products	Products	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
905	en	subcategories	Subcategories	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
906	en	order_tax	Order Tax	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
907	en	service_charges	Service Charges	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
908	en	withholding	Withholding	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
909	en	walk_in_customer	Walk-in Customer	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
910	en	select_customer	Select Customer	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
911	en	select_category_view_subcategories	Select a category to view subcategories	messages	2026-02-17 20:01:22	2026-02-17 20:01:22
912	en	payment	Payment	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
913	en	void	Void	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
914	fa	hold_orders	سفارشات نگه‌داشته	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
915	fa	hold	نگه‌داری	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
916	fa	transaction	تراکنش	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
917	fa	transaction_id	شناسه تراکنش	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
918	fa	products	محصولات	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
919	fa	subcategories	زیر دسته‌ها	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
920	fa	order_tax	مالیات سفارش	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
921	fa	service_charges	هزینه خدمات	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
922	fa	withholding	کسر مالیات	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
923	fa	walk_in_customer	مشتری بدون ثبت نام	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
924	fa	select_customer	انتخاب مشتری	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
925	fa	select_category_view_subcategories	برای مشاهده زیر دسته‌ها، یک دسته انتخاب کنید	messages	2026-02-17 20:01:22	2026-02-17 20:01:22
926	fa	payment	پرداخت	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
927	fa	void	لغو	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
928	ur	hold_orders	ہولڈ آرڈرز	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
929	ur	hold	ہولڈ	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
930	ur	transaction	ٹرانزیکشن	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
931	ur	transaction_id	ٹرانزیکشن آئی ڈی	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
932	ur	products	پروڈکٹس	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
933	ur	subcategories	ذیلی کیٹگریز	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
934	ur	order_tax	آرڈر ٹیکس	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
935	ur	service_charges	سروس چارجز	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
936	ur	withholding	وائٹ ہولڈنگ	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
937	ur	walk_in_customer	واک ان کسٹمر	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
938	ur	select_customer	کسٹمر منتخب کریں	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
939	ur	select_category_view_subcategories	ذیلی کیٹگریز دیکھنے کے لیے ایک کیٹگری منتخب کریں	messages	2026-02-17 20:01:22	2026-02-17 20:01:22
940	ur	payment	پیمنٹ	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
941	ur	void	وائڈ	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
942	ar	hold_orders	الطلبات المحفوظة	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
943	ar	hold	حفظ	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
944	ar	transaction	المعاملة	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
945	ar	transaction_id	رقم المعاملة	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
946	ar	products	المنتجات	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
947	ar	subcategories	الفئات الفرعية	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
948	ar	order_tax	ضريبة الطلب	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
949	ar	service_charges	رسوم الخدمة	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
950	ar	withholding	الاستقطاع	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
951	ar	walk_in_customer	عميل بدون تسجيل	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
952	ar	select_customer	اختر العميل	labels	2026-02-17 20:01:22	2026-02-17 20:01:22
953	ar	select_category_view_subcategories	اختر فئة لعرض الفئات الفرعية	messages	2026-02-17 20:01:22	2026-02-17 20:01:22
954	ar	payment	الدفع	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
955	ar	void	إلغاء	buttons	2026-02-17 20:01:22	2026-02-17 20:01:22
\.


--
-- Data for Name: uom_groups; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.uom_groups (id, code, name) FROM stdin;
1	CNT	Count
2	WGT	Weight
3	VLM	Volume
4	LGT	Length
\.


--
-- Data for Name: uoms; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.uoms (id, name, symbol, group_id, base_quantity, is_base) FROM stdin;
1	Piece	pc	1	1.0000	t
2	Dozen	dz	1	12.0000	f
3	Gram	g	2	1.0000	t
4	Kilogram	kg	2	1000.0000	f
5	Milligram	mg	2	0.0010	f
6	Liter	l	3	1.0000	t
7	Milliliter	ml	3	0.0010	f
8	Centimeter	cm	4	1.0000	t
9	Meter	m	4	100.0000	f
\.


--
-- Data for Name: user_language_preferences; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.user_language_preferences (id, user_id, language_code, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.users (id, assigned_store_id, default_branch_id, username, email, password, role_id, is_active, last_login, created_at, updated_at, pin, profile_picture, pin_required_for_void, pin_login_enabled, cash_access) FROM stdin;
2	1	1	cashier	test@gmail.com	$2y$10$v2ggo8MgS1shRy7a7bWBouBktIyrMo.geYOb3.bAUJXS/wnRNqYcK	2	t	\N	2025-08-17 19:35:17	2026-05-20 17:28:03		\N	t	f	t
4	\N	1	test	muhammadasnaffkhan@gmail.com	$2y$10$vmyGn5WOH1CuEQHWojF/G.O3GO4umCOR1LybeC5bDhGgPSZwtcKR.	1	t	\N	2026-06-02 18:23:52.838446	2026-06-02 18:23:52.838446		\N	t	f	t
1	1	1	admin	admin@gmail.com	$2y$10$15ETnDm2P5EVQfWBIpLTauhZ5wkJ7lFxYnYyvLnMHlcBrbK0vSXru	1	t	2026-06-02 20:46:42.745406	2025-08-17 19:35:17	2026-05-31 15:40:16	1111	\N	t	f	t
\.


--
-- Data for Name: vendors; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.vendors (id, primary_store_id, name, contact_number, email, address, is_active, created_at) FROM stdin;
\.


--
-- Data for Name: video_help; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.video_help (id, page_name, page_title, video_url, video_title, description, is_active, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: void_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.void_items (id, source_type, source_id, hold_item_id, sale_item_id, item_id, item_name, quantity, unit_price, tax_rate, modifiers, remarks, void_reason_id, voided_by, voided_at) FROM stdin;
\.


--
-- Data for Name: void_orders; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.void_orders (id, store_id, sale_id, void_reason_id, voided_by, voided_at, notes, original_amount) FROM stdin;
\.


--
-- Data for Name: void_reasons; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.void_reasons (id, reason_name, description, is_active, created_at) FROM stdin;
1	Mistake		t	2026-05-04 20:08:55
\.


--
-- Data for Name: warranties; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.warranties (id, name, months, days, is_active, created_at) FROM stdin;
1	No Warranty	0	0	t	2025-11-05 22:16:45
2	3 Months	3	0	t	2025-11-05 22:16:45
3	6 Months	6	0	t	2025-11-05 22:16:45
4	1 Year	12	0	t	2025-11-05 22:16:45
5	2 Years	24	0	t	2025-11-05 22:16:45
\.


--
-- Data for Name: wastage; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.wastage (id, wastage_number, store_id, branch_id, wastage_date, total_items, total_wastage_value, remarks, created_by, journal_entry_id, created_at) FROM stdin;
\.


--
-- Data for Name: wastage_items; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.wastage_items (id, wastage_id, item_id, item_name, quantity, cost_price, line_value, loss_reason) FROM stdin;
\.


--
-- Data for Name: zatca_config; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.zatca_config (id, is_enabled, invoice_format, qr_code_size, created_at, updated_at) FROM stdin;
1	f	pdf	150	2026-02-17 20:01:26	2026-02-17 20:01:26
\.


--
-- Data for Name: zatca_invoices; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.zatca_invoices (id, sale_id, invoice_number, invoice_type, invoice_date, seller_vat, buyer_vat, buyer_name, total_amount, tax_amount, amount_excluding_tax, qr_code_data, qr_code_image_url, invoice_data, created_at) FROM stdin;
\.


--
-- Data for Name: zatca_phase2_api_logs; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.zatca_phase2_api_logs (id, zatca_phase2_invoice_id, endpoint, http_method, request_headers, request_body, response_status, response_headers, response_body, duration_ms, correlation_id, created_at) FROM stdin;
\.


--
-- Data for Name: zatca_phase2_certificates; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.zatca_phase2_certificates (id, store_id, environment, device_identifier, certificate_type, certificate_serial, issuer_dn, subject_dn, valid_from, valid_to, csr_pem, certificate_pem, private_key_ref, fingerprint_sha256, is_active, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: zatca_phase2_device_state; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.zatca_phase2_device_state (id, store_id, terminal_id, device_identifier, last_icv, last_invoice_uuid, last_invoice_hash, last_submission_at, updated_at, created_at) FROM stdin;
\.


--
-- Data for Name: zatca_phase2_invoices; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.zatca_phase2_invoices (id, sale_id, invoice_number, invoice_type, uuid, icv, previous_invoice_hash, invoice_hash, unsigned_xml, signed_xml, canonical_xml_hash, qr_tlv_base64, authority_submission_type, authority_invoice_ref, authority_status, authority_response_code, authority_response_message, status, retry_count, next_retry_at, last_error_at, last_error_message, submitted_at, cleared_at, reported_at, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: zatca_phase2_jobs; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.zatca_phase2_jobs (id, zatca_phase2_invoice_id, job_type, status, attempt_count, max_attempts, run_after, locked_at, locked_by, last_error, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: zatca_phase2_status_history; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.zatca_phase2_status_history (id, zatca_phase2_invoice_id, from_status, to_status, event_source, reason_code, reason_message, created_at) FROM stdin;
\.


--
-- Name: account_mappings_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.account_mappings_id_seq', 39, true);


--
-- Name: account_transactions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.account_transactions_id_seq', 1, false);


--
-- Name: account_types_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.account_types_id_seq', 5, true);


--
-- Name: bank_accounts_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.bank_accounts_id_seq', 1, false);


--
-- Name: bom_components_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.bom_components_id_seq', 1, false);


--
-- Name: bom_master_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.bom_master_id_seq', 1, false);


--
-- Name: branch_info_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.branch_info_id_seq', 1, false);


--
-- Name: card_types_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.card_types_id_seq', 3, true);


--
-- Name: categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.categories_id_seq', 1, false);


--
-- Name: chart_of_accounts_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.chart_of_accounts_id_seq', 47, true);


--
-- Name: cheque_books_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.cheque_books_id_seq', 1, false);


--
-- Name: cheques_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.cheques_id_seq', 1, false);


--
-- Name: cus_outstanding_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.cus_outstanding_id_seq', 1, false);


--
-- Name: cus_payments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.cus_payments_id_seq', 1, false);


--
-- Name: customer_balance_entries_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.customer_balance_entries_id_seq', 1, false);


--
-- Name: customer_categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.customer_categories_id_seq', 1, false);


--
-- Name: customer_subscription_invoices_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.customer_subscription_invoices_id_seq', 1, false);


--
-- Name: customer_subscriptions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.customer_subscriptions_id_seq', 1, false);


--
-- Name: customers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.customers_id_seq', 1, false);


--
-- Name: deal_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.deal_items_id_seq', 1, false);


--
-- Name: deals_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.deals_id_seq', 1, false);


--
-- Name: delivery_orders_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.delivery_orders_id_seq', 1, false);


--
-- Name: delivery_riders_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.delivery_riders_id_seq', 1, false);


--
-- Name: dinein_floors_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.dinein_floors_id_seq', 1, false);


--
-- Name: dinein_tables_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.dinein_tables_id_seq', 1, false);


--
-- Name: discount_categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.discount_categories_id_seq', 1, false);


--
-- Name: discounts_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.discounts_id_seq', 1, false);


--
-- Name: expense_accounts_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.expense_accounts_id_seq', 1, false);


--
-- Name: expense_categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.expense_categories_id_seq', 1, false);


--
-- Name: expense_subcategories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.expense_subcategories_id_seq', 1, false);


--
-- Name: expenses_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.expenses_id_seq', 1, false);


--
-- Name: fbr_config_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.fbr_config_id_seq', 1, false);


--
-- Name: fbr_digital_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.fbr_digital_id_seq', 1, false);


--
-- Name: fbr_invoices_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.fbr_invoices_id_seq', 1, false);


--
-- Name: fbr_logs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.fbr_logs_id_seq', 1, false);


--
-- Name: fiscal_periods_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.fiscal_periods_id_seq', 1, false);


--
-- Name: hold_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.hold_items_id_seq', 1, false);


--
-- Name: hold_orders_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.hold_orders_id_seq', 1, false);


--
-- Name: inventory_movements_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.inventory_movements_id_seq', 1, false);


--
-- Name: item_barcodes_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.item_barcodes_id_seq', 1, false);


--
-- Name: item_line_discounts_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.item_line_discounts_id_seq', 1, false);


--
-- Name: item_modifier_group_assignments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.item_modifier_group_assignments_id_seq', 1, false);


--
-- Name: item_modifier_groups_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.item_modifier_groups_id_seq', 1, false);


--
-- Name: item_modifiers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.item_modifiers_id_seq', 1, false);


--
-- Name: item_serial_transactions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.item_serial_transactions_id_seq', 1, false);


--
-- Name: item_serials_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.item_serials_id_seq', 1, false);


--
-- Name: items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.items_id_seq', 1, false);


--
-- Name: journal_entries_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.journal_entries_id_seq', 1, false);


--
-- Name: journal_entry_lines_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.journal_entry_lines_id_seq', 1, false);


--
-- Name: kds_activity_log_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.kds_activity_log_id_seq', 1, false);


--
-- Name: kds_cleanup_log_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.kds_cleanup_log_id_seq', 1, false);


--
-- Name: kds_order_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.kds_order_items_id_seq', 1, false);


--
-- Name: kds_orders_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.kds_orders_id_seq', 1, false);


--
-- Name: kds_settings_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.kds_settings_id_seq', 1, false);


--
-- Name: kds_station_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.kds_station_items_id_seq', 1, false);


--
-- Name: kds_stations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.kds_stations_id_seq', 1, false);


--
-- Name: kpra_config_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.kpra_config_id_seq', 1, false);


--
-- Name: kpra_invoices_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.kpra_invoices_id_seq', 1, false);


--
-- Name: kpra_logs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.kpra_logs_id_seq', 1, false);


--
-- Name: languages_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.languages_id_seq', 4, true);


--
-- Name: modifier_group_assignments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.modifier_group_assignments_id_seq', 1, false);


--
-- Name: modifier_template_options_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.modifier_template_options_id_seq', 1, false);


--
-- Name: modifier_templates_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.modifier_templates_id_seq', 1, false);


--
-- Name: order_takers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.order_takers_id_seq', 1, false);


--
-- Name: payment_method_tax_rates_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.payment_method_tax_rates_id_seq', 6, true);


--
-- Name: payment_methods_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.payment_methods_id_seq', 7, true);


--
-- Name: price_history_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.price_history_id_seq', 1, false);


--
-- Name: print_devices_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.print_devices_id_seq', 3, true);


--
-- Name: production_cost_lines_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.production_cost_lines_id_seq', 1, false);


--
-- Name: production_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.production_items_id_seq', 1, false);


--
-- Name: production_materials_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.production_materials_id_seq', 1, false);


--
-- Name: production_orders_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.production_orders_id_seq', 1, false);


--
-- Name: purchase_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.purchase_items_id_seq', 1, false);


--
-- Name: purchase_order_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.purchase_order_items_id_seq', 1, false);


--
-- Name: purchase_orders_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.purchase_orders_id_seq', 1, false);


--
-- Name: purchase_return_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.purchase_return_items_id_seq', 1, false);


--
-- Name: purchase_returns_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.purchase_returns_id_seq', 1, false);


--
-- Name: purchases_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.purchases_id_seq', 1, false);


--
-- Name: quotation_drafts_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.quotation_drafts_id_seq', 1, false);


--
-- Name: quotation_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.quotation_items_id_seq', 1, false);


--
-- Name: quotations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.quotations_id_seq', 1, false);


--
-- Name: rights_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.rights_id_seq', 117, true);


--
-- Name: roles_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.roles_id_seq', 2, true);


--
-- Name: sale_item_modifiers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.sale_item_modifiers_id_seq', 1, false);


--
-- Name: sale_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.sale_items_id_seq', 1, false);


--
-- Name: sale_return_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.sale_return_items_id_seq', 1, false);


--
-- Name: sale_returns_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.sale_returns_id_seq', 1, false);


--
-- Name: sales_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.sales_id_seq', 1, false);


--
-- Name: setting_categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.setting_categories_id_seq', 13, true);


--
-- Name: setting_options_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.setting_options_id_seq', 53, true);


--
-- Name: settings_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.settings_id_seq', 67, true);


--
-- Name: shift_logs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.shift_logs_id_seq', 1, false);


--
-- Name: shifts_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.shifts_id_seq', 1, false);


--
-- Name: stock_adjustment_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.stock_adjustment_items_id_seq', 1, false);


--
-- Name: stock_adjustments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.stock_adjustments_id_seq', 1, false);


--
-- Name: stock_transfer_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.stock_transfer_items_id_seq', 1, false);


--
-- Name: stock_transfers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.stock_transfers_id_seq', 1, false);


--
-- Name: store_inventory_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.store_inventory_id_seq', 1, false);


--
-- Name: stores_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.stores_id_seq', 1, false);


--
-- Name: sub_categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.sub_categories_id_seq', 1, false);


--
-- Name: subscription_plans_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.subscription_plans_id_seq', 1, false);


--
-- Name: sup_outstanding_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.sup_outstanding_id_seq', 1, false);


--
-- Name: sup_payments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.sup_payments_id_seq', 1, false);


--
-- Name: supplier_balance_entries_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.supplier_balance_entries_id_seq', 1, false);


--
-- Name: sync_settings_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.sync_settings_id_seq', 1, false);


--
-- Name: table_transfer_logs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.table_transfer_logs_id_seq', 1, false);


--
-- Name: tax_rates_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.tax_rates_id_seq', 2, true);


--
-- Name: terminals_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.terminals_id_seq', 1, false);


--
-- Name: translations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.translations_id_seq', 955, true);


--
-- Name: uom_groups_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.uom_groups_id_seq', 4, true);


--
-- Name: uoms_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.uoms_id_seq', 9, true);


--
-- Name: user_language_preferences_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.user_language_preferences_id_seq', 1, false);


--
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.users_id_seq', 4, true);


--
-- Name: vendors_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.vendors_id_seq', 1, false);


--
-- Name: video_help_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.video_help_id_seq', 1, false);


--
-- Name: void_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.void_items_id_seq', 1, false);


--
-- Name: void_orders_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.void_orders_id_seq', 1, false);


--
-- Name: void_reasons_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.void_reasons_id_seq', 1, true);


--
-- Name: warranties_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.warranties_id_seq', 5, true);


--
-- Name: wastage_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.wastage_id_seq', 1, false);


--
-- Name: wastage_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.wastage_items_id_seq', 1, false);


--
-- Name: zatca_config_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.zatca_config_id_seq', 1, true);


--
-- Name: zatca_invoices_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.zatca_invoices_id_seq', 1, false);


--
-- Name: zatca_phase2_api_logs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.zatca_phase2_api_logs_id_seq', 1, false);


--
-- Name: zatca_phase2_certificates_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.zatca_phase2_certificates_id_seq', 1, false);


--
-- Name: zatca_phase2_device_state_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.zatca_phase2_device_state_id_seq', 1, false);


--
-- Name: zatca_phase2_invoices_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.zatca_phase2_invoices_id_seq', 1, false);


--
-- Name: zatca_phase2_jobs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.zatca_phase2_jobs_id_seq', 1, false);


--
-- Name: zatca_phase2_status_history_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.zatca_phase2_status_history_id_seq', 1, false);


--
-- Name: account_mappings account_mappings_mapping_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.account_mappings
    ADD CONSTRAINT account_mappings_mapping_code UNIQUE (mapping_code);


--
-- Name: account_mappings account_mappings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.account_mappings
    ADD CONSTRAINT account_mappings_pkey PRIMARY KEY (id);


--
-- Name: account_transactions account_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.account_transactions
    ADD CONSTRAINT account_transactions_pkey PRIMARY KEY (id);


--
-- Name: account_types account_types_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.account_types
    ADD CONSTRAINT account_types_pkey PRIMARY KEY (id);


--
-- Name: account_types account_types_type_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.account_types
    ADD CONSTRAINT account_types_type_code UNIQUE (type_code);


--
-- Name: bank_access bank_access_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.bank_access
    ADD CONSTRAINT bank_access_pkey PRIMARY KEY (user_id, bank_account_id);


--
-- Name: bank_accounts bank_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.bank_accounts
    ADD CONSTRAINT bank_accounts_pkey PRIMARY KEY (id);


--
-- Name: bom_components bom_components_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.bom_components
    ADD CONSTRAINT bom_components_pkey PRIMARY KEY (id);


--
-- Name: bom_master bom_master_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.bom_master
    ADD CONSTRAINT bom_master_pkey PRIMARY KEY (id);


--
-- Name: branch_access branch_access_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.branch_access
    ADD CONSTRAINT branch_access_pkey PRIMARY KEY (user_id, branch_id);


--
-- Name: branch_info branch_info_branch_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.branch_info
    ADD CONSTRAINT branch_info_branch_code UNIQUE (branch_code);


--
-- Name: branch_info branch_info_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.branch_info
    ADD CONSTRAINT branch_info_pkey PRIMARY KEY (id);


--
-- Name: card_types card_types_card_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.card_types
    ADD CONSTRAINT card_types_card_code UNIQUE (card_code);


--
-- Name: card_types card_types_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.card_types
    ADD CONSTRAINT card_types_pkey PRIMARY KEY (id);


--
-- Name: categories categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.categories
    ADD CONSTRAINT categories_pkey PRIMARY KEY (id);


--
-- Name: chart_of_accounts chart_of_accounts_account_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.chart_of_accounts
    ADD CONSTRAINT chart_of_accounts_account_code UNIQUE (account_code);


--
-- Name: chart_of_accounts chart_of_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.chart_of_accounts
    ADD CONSTRAINT chart_of_accounts_pkey PRIMARY KEY (id);


--
-- Name: cheque_books cheque_books_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.cheque_books
    ADD CONSTRAINT cheque_books_pkey PRIMARY KEY (id);


--
-- Name: cheques cheques_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.cheques
    ADD CONSTRAINT cheques_pkey PRIMARY KEY (id);


--
-- Name: cheques cheques_uq_bank_cheque_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.cheques
    ADD CONSTRAINT cheques_uq_bank_cheque_number UNIQUE (bank_account_id, cheque_number);


--
-- Name: cus_outstanding cus_outstanding_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.cus_outstanding
    ADD CONSTRAINT cus_outstanding_pkey PRIMARY KEY (id);


--
-- Name: cus_payments cus_payments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.cus_payments
    ADD CONSTRAINT cus_payments_pkey PRIMARY KEY (id);


--
-- Name: customer_balance_entries customer_balance_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.customer_balance_entries
    ADD CONSTRAINT customer_balance_entries_pkey PRIMARY KEY (id);


--
-- Name: customer_balance_entries customer_balance_entries_uniq_entry_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.customer_balance_entries
    ADD CONSTRAINT customer_balance_entries_uniq_entry_number UNIQUE (entry_number);


--
-- Name: customer_categories customer_categories_category_name; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.customer_categories
    ADD CONSTRAINT customer_categories_category_name UNIQUE (category_name);


--
-- Name: customer_categories customer_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.customer_categories
    ADD CONSTRAINT customer_categories_pkey PRIMARY KEY (id);


--
-- Name: customer_subscription_invoices customer_subscription_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.customer_subscription_invoices
    ADD CONSTRAINT customer_subscription_invoices_pkey PRIMARY KEY (id);


--
-- Name: customer_subscription_invoices customer_subscription_invoices_uq_subscription_sale; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.customer_subscription_invoices
    ADD CONSTRAINT customer_subscription_invoices_uq_subscription_sale UNIQUE (subscription_id, sale_id);


--
-- Name: customer_subscriptions customer_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.customer_subscriptions
    ADD CONSTRAINT customer_subscriptions_pkey PRIMARY KEY (id);


--
-- Name: customers customers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.customers
    ADD CONSTRAINT customers_pkey PRIMARY KEY (id);


--
-- Name: deal_items deal_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.deal_items
    ADD CONSTRAINT deal_items_pkey PRIMARY KEY (id);


--
-- Name: deals deals_item_id; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.deals
    ADD CONSTRAINT deals_item_id UNIQUE (item_id);


--
-- Name: deals deals_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.deals
    ADD CONSTRAINT deals_pkey PRIMARY KEY (id);


--
-- Name: delivery_orders delivery_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.delivery_orders
    ADD CONSTRAINT delivery_orders_pkey PRIMARY KEY (id);


--
-- Name: delivery_riders delivery_riders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.delivery_riders
    ADD CONSTRAINT delivery_riders_pkey PRIMARY KEY (id);


--
-- Name: dinein_floors dinein_floors_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.dinein_floors
    ADD CONSTRAINT dinein_floors_pkey PRIMARY KEY (id);


--
-- Name: dinein_tables dinein_tables_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.dinein_tables
    ADD CONSTRAINT dinein_tables_pkey PRIMARY KEY (id);


--
-- Name: discount_categories discount_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.discount_categories
    ADD CONSTRAINT discount_categories_pkey PRIMARY KEY (id);


--
-- Name: discounts discounts_discount_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.discounts
    ADD CONSTRAINT discounts_discount_code UNIQUE (discount_code);


--
-- Name: discounts discounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.discounts
    ADD CONSTRAINT discounts_pkey PRIMARY KEY (id);


--
-- Name: expense_accounts expense_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.expense_accounts
    ADD CONSTRAINT expense_accounts_pkey PRIMARY KEY (id);


--
-- Name: expense_categories expense_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.expense_categories
    ADD CONSTRAINT expense_categories_pkey PRIMARY KEY (id);


--
-- Name: expense_subcategories expense_subcategories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.expense_subcategories
    ADD CONSTRAINT expense_subcategories_pkey PRIMARY KEY (id);


--
-- Name: expenses expenses_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.expenses
    ADD CONSTRAINT expenses_pkey PRIMARY KEY (id);


--
-- Name: fbr_config fbr_config_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.fbr_config
    ADD CONSTRAINT fbr_config_pkey PRIMARY KEY (id);


--
-- Name: fbr_digital fbr_digital_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.fbr_digital
    ADD CONSTRAINT fbr_digital_pkey PRIMARY KEY (id);


--
-- Name: fbr_invoices fbr_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.fbr_invoices
    ADD CONSTRAINT fbr_invoices_pkey PRIMARY KEY (id);


--
-- Name: fbr_logs fbr_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.fbr_logs
    ADD CONSTRAINT fbr_logs_pkey PRIMARY KEY (id);


--
-- Name: fiscal_period_setup fiscal_period_setup_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.fiscal_period_setup
    ADD CONSTRAINT fiscal_period_setup_pkey PRIMARY KEY (start_year);


--
-- Name: fiscal_periods fiscal_periods_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.fiscal_periods
    ADD CONSTRAINT fiscal_periods_pkey PRIMARY KEY (id);


--
-- Name: fiscal_periods fiscal_periods_unique_period_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.fiscal_periods
    ADD CONSTRAINT fiscal_periods_unique_period_code UNIQUE (period_code);


--
-- Name: hold_items hold_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.hold_items
    ADD CONSTRAINT hold_items_pkey PRIMARY KEY (id);


--
-- Name: hold_orders hold_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.hold_orders
    ADD CONSTRAINT hold_orders_pkey PRIMARY KEY (id);


--
-- Name: inventory_movements inventory_movements_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.inventory_movements
    ADD CONSTRAINT inventory_movements_pkey PRIMARY KEY (id);


--
-- Name: item_barcodes item_barcodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_barcodes
    ADD CONSTRAINT item_barcodes_pkey PRIMARY KEY (id);


--
-- Name: item_barcodes item_barcodes_uniq_item_barcodes_barcode; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_barcodes
    ADD CONSTRAINT item_barcodes_uniq_item_barcodes_barcode UNIQUE (barcode);


--
-- Name: item_line_discounts item_line_discounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_line_discounts
    ADD CONSTRAINT item_line_discounts_pkey PRIMARY KEY (id);


--
-- Name: item_line_discounts item_line_discounts_uk_item_line_discounts_item_id; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_line_discounts
    ADD CONSTRAINT item_line_discounts_uk_item_line_discounts_item_id UNIQUE (item_id);


--
-- Name: item_modifier_group_assignments item_modifier_group_assignments_item_modifier_unique; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_modifier_group_assignments
    ADD CONSTRAINT item_modifier_group_assignments_item_modifier_unique UNIQUE (item_id, modifier_group_id);


--
-- Name: item_modifier_group_assignments item_modifier_group_assignments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_modifier_group_assignments
    ADD CONSTRAINT item_modifier_group_assignments_pkey PRIMARY KEY (id);


--
-- Name: item_modifier_groups item_modifier_groups_name; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_modifier_groups
    ADD CONSTRAINT item_modifier_groups_name UNIQUE (name);


--
-- Name: item_modifier_groups item_modifier_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_modifier_groups
    ADD CONSTRAINT item_modifier_groups_pkey PRIMARY KEY (id);


--
-- Name: item_modifiers item_modifiers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_modifiers
    ADD CONSTRAINT item_modifiers_pkey PRIMARY KEY (id);


--
-- Name: item_serial_transactions item_serial_transactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_serial_transactions
    ADD CONSTRAINT item_serial_transactions_pkey PRIMARY KEY (id);


--
-- Name: item_serials item_serials_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_serials
    ADD CONSTRAINT item_serials_pkey PRIMARY KEY (id);


--
-- Name: item_serials item_serials_uq_item_serial; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_serials
    ADD CONSTRAINT item_serials_uq_item_serial UNIQUE (item_id, serial_no);


--
-- Name: items items_item_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.items
    ADD CONSTRAINT items_item_code UNIQUE (item_code);


--
-- Name: items items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.items
    ADD CONSTRAINT items_pkey PRIMARY KEY (id);


--
-- Name: journal_entries journal_entries_entry_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.journal_entries
    ADD CONSTRAINT journal_entries_entry_number UNIQUE (entry_number);


--
-- Name: journal_entries journal_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.journal_entries
    ADD CONSTRAINT journal_entries_pkey PRIMARY KEY (id);


--
-- Name: journal_entry_lines journal_entry_lines_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.journal_entry_lines
    ADD CONSTRAINT journal_entry_lines_pkey PRIMARY KEY (id);


--
-- Name: kds_activity_log kds_activity_log_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kds_activity_log
    ADD CONSTRAINT kds_activity_log_pkey PRIMARY KEY (id);


--
-- Name: kds_cleanup_log kds_cleanup_log_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kds_cleanup_log
    ADD CONSTRAINT kds_cleanup_log_pkey PRIMARY KEY (id);


--
-- Name: kds_order_items kds_order_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kds_order_items
    ADD CONSTRAINT kds_order_items_pkey PRIMARY KEY (id);


--
-- Name: kds_orders kds_orders_order_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kds_orders
    ADD CONSTRAINT kds_orders_order_number UNIQUE (order_number);


--
-- Name: kds_orders kds_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kds_orders
    ADD CONSTRAINT kds_orders_pkey PRIMARY KEY (id);


--
-- Name: kds_settings kds_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kds_settings
    ADD CONSTRAINT kds_settings_pkey PRIMARY KEY (id);


--
-- Name: kds_settings kds_settings_setting_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kds_settings
    ADD CONSTRAINT kds_settings_setting_key UNIQUE (setting_key);


--
-- Name: kds_station_items kds_station_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kds_station_items
    ADD CONSTRAINT kds_station_items_pkey PRIMARY KEY (id);


--
-- Name: kds_station_items kds_station_items_station_item_unique; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kds_station_items
    ADD CONSTRAINT kds_station_items_station_item_unique UNIQUE (station_id, item_id);


--
-- Name: kds_stations kds_stations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kds_stations
    ADD CONSTRAINT kds_stations_pkey PRIMARY KEY (id);


--
-- Name: kpra_config kpra_config_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kpra_config
    ADD CONSTRAINT kpra_config_pkey PRIMARY KEY (id);


--
-- Name: kpra_invoices kpra_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kpra_invoices
    ADD CONSTRAINT kpra_invoices_pkey PRIMARY KEY (id);


--
-- Name: kpra_logs kpra_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kpra_logs
    ADD CONSTRAINT kpra_logs_pkey PRIMARY KEY (id);


--
-- Name: languages languages_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.languages
    ADD CONSTRAINT languages_code UNIQUE (code);


--
-- Name: languages languages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.languages
    ADD CONSTRAINT languages_pkey PRIMARY KEY (id);


--
-- Name: modifier_group_assignments modifier_group_assignments_modifier_group_unique; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.modifier_group_assignments
    ADD CONSTRAINT modifier_group_assignments_modifier_group_unique UNIQUE (modifier_id, modifier_group_id);


--
-- Name: modifier_group_assignments modifier_group_assignments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.modifier_group_assignments
    ADD CONSTRAINT modifier_group_assignments_pkey PRIMARY KEY (id);


--
-- Name: modifier_template_options modifier_template_options_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.modifier_template_options
    ADD CONSTRAINT modifier_template_options_pkey PRIMARY KEY (id);


--
-- Name: modifier_templates modifier_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.modifier_templates
    ADD CONSTRAINT modifier_templates_pkey PRIMARY KEY (id);


--
-- Name: order_takers order_takers_employee_id; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.order_takers
    ADD CONSTRAINT order_takers_employee_id UNIQUE (employee_id);


--
-- Name: order_takers order_takers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.order_takers
    ADD CONSTRAINT order_takers_pkey PRIMARY KEY (id);


--
-- Name: payment_method_tax_rates payment_method_tax_rates_payment_method; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.payment_method_tax_rates
    ADD CONSTRAINT payment_method_tax_rates_payment_method UNIQUE (payment_method);


--
-- Name: payment_method_tax_rates payment_method_tax_rates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.payment_method_tax_rates
    ADD CONSTRAINT payment_method_tax_rates_pkey PRIMARY KEY (id);


--
-- Name: payment_methods payment_methods_method_name; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.payment_methods
    ADD CONSTRAINT payment_methods_method_name UNIQUE (method_name);


--
-- Name: payment_methods payment_methods_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.payment_methods
    ADD CONSTRAINT payment_methods_pkey PRIMARY KEY (id);


--
-- Name: price_history price_history_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.price_history
    ADD CONSTRAINT price_history_pkey PRIMARY KEY (id);


--
-- Name: print_devices print_devices_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.print_devices
    ADD CONSTRAINT print_devices_pkey PRIMARY KEY (id);


--
-- Name: production_cost_lines production_cost_lines_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.production_cost_lines
    ADD CONSTRAINT production_cost_lines_pkey PRIMARY KEY (id);


--
-- Name: production_items production_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.production_items
    ADD CONSTRAINT production_items_pkey PRIMARY KEY (id);


--
-- Name: production_materials production_materials_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.production_materials
    ADD CONSTRAINT production_materials_pkey PRIMARY KEY (id);


--
-- Name: production_orders production_orders_order_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.production_orders
    ADD CONSTRAINT production_orders_order_number UNIQUE (order_number);


--
-- Name: production_orders production_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.production_orders
    ADD CONSTRAINT production_orders_pkey PRIMARY KEY (id);


--
-- Name: purchase_items purchase_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.purchase_items
    ADD CONSTRAINT purchase_items_pkey PRIMARY KEY (id);


--
-- Name: purchase_order_items purchase_order_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.purchase_order_items
    ADD CONSTRAINT purchase_order_items_pkey PRIMARY KEY (id);


--
-- Name: purchase_orders purchase_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.purchase_orders
    ADD CONSTRAINT purchase_orders_pkey PRIMARY KEY (id);


--
-- Name: purchase_orders purchase_orders_uk_po_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.purchase_orders
    ADD CONSTRAINT purchase_orders_uk_po_number UNIQUE (po_number);


--
-- Name: purchase_return_items purchase_return_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.purchase_return_items
    ADD CONSTRAINT purchase_return_items_pkey PRIMARY KEY (id);


--
-- Name: purchase_returns purchase_returns_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.purchase_returns
    ADD CONSTRAINT purchase_returns_pkey PRIMARY KEY (id);


--
-- Name: purchases purchases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.purchases
    ADD CONSTRAINT purchases_pkey PRIMARY KEY (id);


--
-- Name: purchases purchases_purchase_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.purchases
    ADD CONSTRAINT purchases_purchase_number UNIQUE (purchase_number);


--
-- Name: quotation_drafts quotation_drafts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.quotation_drafts
    ADD CONSTRAINT quotation_drafts_pkey PRIMARY KEY (id);


--
-- Name: quotation_drafts quotation_drafts_uq_quotation_draft_user_store; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.quotation_drafts
    ADD CONSTRAINT quotation_drafts_uq_quotation_draft_user_store UNIQUE (user_id, store_id);


--
-- Name: quotation_items quotation_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.quotation_items
    ADD CONSTRAINT quotation_items_pkey PRIMARY KEY (id);


--
-- Name: quotations quotations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.quotations
    ADD CONSTRAINT quotations_pkey PRIMARY KEY (id);


--
-- Name: quotations quotations_quotation_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.quotations
    ADD CONSTRAINT quotations_quotation_number UNIQUE (quotation_number);


--
-- Name: rights rights_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.rights
    ADD CONSTRAINT rights_pkey PRIMARY KEY (id);


--
-- Name: role_rights role_rights_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.role_rights
    ADD CONSTRAINT role_rights_pkey PRIMARY KEY (role_id, right_id);


--
-- Name: roles roles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.roles
    ADD CONSTRAINT roles_pkey PRIMARY KEY (id);


--
-- Name: sale_item_modifiers sale_item_modifiers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.sale_item_modifiers
    ADD CONSTRAINT sale_item_modifiers_pkey PRIMARY KEY (id);


--
-- Name: sale_items sale_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.sale_items
    ADD CONSTRAINT sale_items_pkey PRIMARY KEY (id);


--
-- Name: sale_return_items sale_return_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.sale_return_items
    ADD CONSTRAINT sale_return_items_pkey PRIMARY KEY (id);


--
-- Name: sale_returns sale_returns_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.sale_returns
    ADD CONSTRAINT sale_returns_pkey PRIMARY KEY (id);


--
-- Name: sales sales_invoice_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.sales
    ADD CONSTRAINT sales_invoice_number UNIQUE (invoice_number);


--
-- Name: sales sales_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.sales
    ADD CONSTRAINT sales_pkey PRIMARY KEY (id);


--
-- Name: setting_categories setting_categories_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.setting_categories
    ADD CONSTRAINT setting_categories_code UNIQUE (code);


--
-- Name: setting_categories setting_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.setting_categories
    ADD CONSTRAINT setting_categories_pkey PRIMARY KEY (id);


--
-- Name: setting_options setting_options_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.setting_options
    ADD CONSTRAINT setting_options_pkey PRIMARY KEY (id);


--
-- Name: settings settings_idx_settings_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.settings
    ADD CONSTRAINT settings_idx_settings_code UNIQUE (code);


--
-- Name: settings settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.settings
    ADD CONSTRAINT settings_pkey PRIMARY KEY (id);


--
-- Name: shift_logs shift_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.shift_logs
    ADD CONSTRAINT shift_logs_pkey PRIMARY KEY (id);


--
-- Name: shifts shifts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.shifts
    ADD CONSTRAINT shifts_pkey PRIMARY KEY (id);


--
-- Name: stock_adjustment_items stock_adjustment_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.stock_adjustment_items
    ADD CONSTRAINT stock_adjustment_items_pkey PRIMARY KEY (id);


--
-- Name: stock_adjustments stock_adjustments_adjustment_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.stock_adjustments
    ADD CONSTRAINT stock_adjustments_adjustment_number UNIQUE (adjustment_number);


--
-- Name: stock_adjustments stock_adjustments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.stock_adjustments
    ADD CONSTRAINT stock_adjustments_pkey PRIMARY KEY (id);


--
-- Name: stock_transfer_items stock_transfer_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.stock_transfer_items
    ADD CONSTRAINT stock_transfer_items_pkey PRIMARY KEY (id);


--
-- Name: stock_transfers stock_transfers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.stock_transfers
    ADD CONSTRAINT stock_transfers_pkey PRIMARY KEY (id);


--
-- Name: stock_transfers stock_transfers_transfer_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.stock_transfers
    ADD CONSTRAINT stock_transfers_transfer_number UNIQUE (transfer_number);


--
-- Name: store_inventory store_inventory_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.store_inventory
    ADD CONSTRAINT store_inventory_pkey PRIMARY KEY (id);


--
-- Name: store_inventory store_inventory_store_item_unique; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.store_inventory
    ADD CONSTRAINT store_inventory_store_item_unique UNIQUE (store_id, item_id);


--
-- Name: stores stores_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.stores
    ADD CONSTRAINT stores_pkey PRIMARY KEY (id);


--
-- Name: stores stores_store_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.stores
    ADD CONSTRAINT stores_store_code UNIQUE (store_code);


--
-- Name: sub_categories sub_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.sub_categories
    ADD CONSTRAINT sub_categories_pkey PRIMARY KEY (id);


--
-- Name: subscription_plans subscription_plans_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.subscription_plans
    ADD CONSTRAINT subscription_plans_pkey PRIMARY KEY (id);


--
-- Name: sup_outstanding sup_outstanding_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.sup_outstanding
    ADD CONSTRAINT sup_outstanding_pkey PRIMARY KEY (id);


--
-- Name: sup_payments sup_payments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.sup_payments
    ADD CONSTRAINT sup_payments_pkey PRIMARY KEY (id);


--
-- Name: supplier_balance_entries supplier_balance_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.supplier_balance_entries
    ADD CONSTRAINT supplier_balance_entries_pkey PRIMARY KEY (id);


--
-- Name: supplier_balance_entries supplier_balance_entries_uniq_entry_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.supplier_balance_entries
    ADD CONSTRAINT supplier_balance_entries_uniq_entry_number UNIQUE (entry_number);


--
-- Name: sync_settings sync_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.sync_settings
    ADD CONSTRAINT sync_settings_pkey PRIMARY KEY (id);


--
-- Name: table_transfer_logs table_transfer_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.table_transfer_logs
    ADD CONSTRAINT table_transfer_logs_pkey PRIMARY KEY (id);


--
-- Name: tax_rates tax_rates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tax_rates
    ADD CONSTRAINT tax_rates_pkey PRIMARY KEY (id);


--
-- Name: terminals terminals_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.terminals
    ADD CONSTRAINT terminals_pkey PRIMARY KEY (id);


--
-- Name: terminals terminals_unique_computer_name; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.terminals
    ADD CONSTRAINT terminals_unique_computer_name UNIQUE (computer_name);


--
-- Name: translations translations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.translations
    ADD CONSTRAINT translations_pkey PRIMARY KEY (id);


--
-- Name: translations translations_unique_translation; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.translations
    ADD CONSTRAINT translations_unique_translation UNIQUE (language_code, key);


--
-- Name: uom_groups uom_groups_code; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.uom_groups
    ADD CONSTRAINT uom_groups_code UNIQUE (code);


--
-- Name: uom_groups uom_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.uom_groups
    ADD CONSTRAINT uom_groups_pkey PRIMARY KEY (id);


--
-- Name: uoms uoms_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.uoms
    ADD CONSTRAINT uoms_pkey PRIMARY KEY (id);


--
-- Name: user_language_preferences user_language_preferences_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.user_language_preferences
    ADD CONSTRAINT user_language_preferences_pkey PRIMARY KEY (id);


--
-- Name: user_language_preferences user_language_preferences_user_id; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.user_language_preferences
    ADD CONSTRAINT user_language_preferences_user_id UNIQUE (user_id);


--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_pkey PRIMARY KEY (id);


--
-- Name: vendors vendors_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.vendors
    ADD CONSTRAINT vendors_pkey PRIMARY KEY (id);


--
-- Name: video_help video_help_page_name; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.video_help
    ADD CONSTRAINT video_help_page_name UNIQUE (page_name);


--
-- Name: video_help video_help_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.video_help
    ADD CONSTRAINT video_help_pkey PRIMARY KEY (id);


--
-- Name: void_items void_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.void_items
    ADD CONSTRAINT void_items_pkey PRIMARY KEY (id);


--
-- Name: void_orders void_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.void_orders
    ADD CONSTRAINT void_orders_pkey PRIMARY KEY (id);


--
-- Name: void_reasons void_reasons_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.void_reasons
    ADD CONSTRAINT void_reasons_pkey PRIMARY KEY (id);


--
-- Name: warranties warranties_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.warranties
    ADD CONSTRAINT warranties_pkey PRIMARY KEY (id);


--
-- Name: warranties warranties_uq_warranty_name; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.warranties
    ADD CONSTRAINT warranties_uq_warranty_name UNIQUE (name);


--
-- Name: wastage_items wastage_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.wastage_items
    ADD CONSTRAINT wastage_items_pkey PRIMARY KEY (id);


--
-- Name: wastage wastage_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.wastage
    ADD CONSTRAINT wastage_pkey PRIMARY KEY (id);


--
-- Name: wastage wastage_wastage_number; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.wastage
    ADD CONSTRAINT wastage_wastage_number UNIQUE (wastage_number);


--
-- Name: zatca_config zatca_config_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zatca_config
    ADD CONSTRAINT zatca_config_pkey PRIMARY KEY (id);


--
-- Name: zatca_invoices zatca_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zatca_invoices
    ADD CONSTRAINT zatca_invoices_pkey PRIMARY KEY (id);


--
-- Name: zatca_phase2_api_logs zatca_phase2_api_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zatca_phase2_api_logs
    ADD CONSTRAINT zatca_phase2_api_logs_pkey PRIMARY KEY (id);


--
-- Name: zatca_phase2_certificates zatca_phase2_certificates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zatca_phase2_certificates
    ADD CONSTRAINT zatca_phase2_certificates_pkey PRIMARY KEY (id);


--
-- Name: zatca_phase2_device_state zatca_phase2_device_state_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zatca_phase2_device_state
    ADD CONSTRAINT zatca_phase2_device_state_pkey PRIMARY KEY (id);


--
-- Name: zatca_phase2_device_state zatca_phase2_device_state_uq_zatca_p2_device; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zatca_phase2_device_state
    ADD CONSTRAINT zatca_phase2_device_state_uq_zatca_p2_device UNIQUE (store_id, terminal_id, device_identifier);


--
-- Name: zatca_phase2_invoices zatca_phase2_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zatca_phase2_invoices
    ADD CONSTRAINT zatca_phase2_invoices_pkey PRIMARY KEY (id);


--
-- Name: zatca_phase2_invoices zatca_phase2_invoices_uq_zatca_p2_sale_id; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zatca_phase2_invoices
    ADD CONSTRAINT zatca_phase2_invoices_uq_zatca_p2_sale_id UNIQUE (sale_id);


--
-- Name: zatca_phase2_invoices zatca_phase2_invoices_uq_zatca_p2_uuid; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zatca_phase2_invoices
    ADD CONSTRAINT zatca_phase2_invoices_uq_zatca_p2_uuid UNIQUE (uuid);


--
-- Name: zatca_phase2_jobs zatca_phase2_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zatca_phase2_jobs
    ADD CONSTRAINT zatca_phase2_jobs_pkey PRIMARY KEY (id);


--
-- Name: zatca_phase2_status_history zatca_phase2_status_history_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zatca_phase2_status_history
    ADD CONSTRAINT zatca_phase2_status_history_pkey PRIMARY KEY (id);


--
-- Name: account_mappings_idx_account_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_mappings_idx_account_id ON public.account_mappings USING btree (account_id);


--
-- Name: account_mappings_idx_is_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_mappings_idx_is_active ON public.account_mappings USING btree (is_active);


--
-- Name: account_mappings_idx_mapping_code; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_mappings_idx_mapping_code ON public.account_mappings USING btree (mapping_code);


--
-- Name: account_transactions_account_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_transactions_account_id ON public.account_transactions USING btree (account_id);


--
-- Name: account_transactions_fk_account_transactions_branch; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_transactions_fk_account_transactions_branch ON public.account_transactions USING btree (branch_id);


--
-- Name: account_transactions_idx_account_transactions_cheque_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_transactions_idx_account_transactions_cheque_id ON public.account_transactions USING btree (cheque_id);


--
-- Name: account_transactions_idx_account_transactions_created_at; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_transactions_idx_account_transactions_created_at ON public.account_transactions USING btree (created_at);


--
-- Name: account_transactions_idx_account_transactions_sale_account; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_transactions_idx_account_transactions_sale_account ON public.account_transactions USING btree (sale_id, account_type);


--
-- Name: account_transactions_idx_account_transactions_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_transactions_idx_account_transactions_store_id ON public.account_transactions USING btree (store_id);


--
-- Name: account_transactions_idx_account_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_transactions_idx_account_type ON public.account_transactions USING btree (account_type);


--
-- Name: account_transactions_idx_card_last_four; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_transactions_idx_card_last_four ON public.account_transactions USING btree (card_last_four);


--
-- Name: account_transactions_idx_card_type_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_transactions_idx_card_type_id ON public.account_transactions USING btree (card_type_id);


--
-- Name: account_transactions_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_transactions_sale_id ON public.account_transactions USING btree (sale_id);


--
-- Name: account_types_idx_sort_order; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_types_idx_sort_order ON public.account_types USING btree (sort_order);


--
-- Name: account_types_idx_type_code; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX account_types_idx_type_code ON public.account_types USING btree (type_code);


--
-- Name: bank_access_idx_bank_access_bank; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX bank_access_idx_bank_access_bank ON public.bank_access USING btree (bank_account_id);


--
-- Name: bank_access_idx_bank_access_user; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX bank_access_idx_bank_access_user ON public.bank_access USING btree (user_id);


--
-- Name: bank_accounts_idx_chart_of_account_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX bank_accounts_idx_chart_of_account_id ON public.bank_accounts USING btree (chart_of_account_id);


--
-- Name: bank_accounts_idx_mapped_at; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX bank_accounts_idx_mapped_at ON public.bank_accounts USING btree (mapped_at);


--
-- Name: bom_components_bom_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX bom_components_bom_id ON public.bom_components USING btree (bom_id);


--
-- Name: bom_components_component_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX bom_components_component_item_id ON public.bom_components USING btree (component_item_id);


--
-- Name: bom_master_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX bom_master_item_id ON public.bom_master USING btree (item_id);


--
-- Name: branch_access_idx_branch_access_branch; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX branch_access_idx_branch_access_branch ON public.branch_access USING btree (branch_id);


--
-- Name: branch_access_idx_branch_access_user; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX branch_access_idx_branch_access_user ON public.branch_access USING btree (user_id);


--
-- Name: branch_info_idx_branch_info_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX branch_info_idx_branch_info_active ON public.branch_info USING btree (is_active);


--
-- Name: branch_info_idx_branch_info_default; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX branch_info_idx_branch_info_default ON public.branch_info USING btree (is_default);


--
-- Name: branch_info_idx_branch_info_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX branch_info_idx_branch_info_type ON public.branch_info USING btree (branch_type);


--
-- Name: categories_idx_icon; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX categories_idx_icon ON public.categories USING btree (icon);


--
-- Name: chart_of_accounts_idx_account_code; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX chart_of_accounts_idx_account_code ON public.chart_of_accounts USING btree (account_code);


--
-- Name: chart_of_accounts_idx_account_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX chart_of_accounts_idx_account_type ON public.chart_of_accounts USING btree (account_type);


--
-- Name: chart_of_accounts_idx_is_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX chart_of_accounts_idx_is_active ON public.chart_of_accounts USING btree (is_active);


--
-- Name: chart_of_accounts_idx_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX chart_of_accounts_idx_store_id ON public.chart_of_accounts USING btree (store_id);


--
-- Name: cheque_books_idx_cheque_books_bank; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX cheque_books_idx_cheque_books_bank ON public.cheque_books USING btree (bank_account_id);


--
-- Name: cheque_books_idx_cheque_books_branch; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX cheque_books_idx_cheque_books_branch ON public.cheque_books USING btree (branch_id);


--
-- Name: cheques_idx_cheques_book; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX cheques_idx_cheques_book ON public.cheques USING btree (cheque_book_id);


--
-- Name: cheques_idx_cheques_branch; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX cheques_idx_cheques_branch ON public.cheques USING btree (branch_id);


--
-- Name: cheques_idx_cheques_sale; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX cheques_idx_cheques_sale ON public.cheques USING btree (sale_id);


--
-- Name: cheques_idx_cheques_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX cheques_idx_cheques_status ON public.cheques USING btree (status);


--
-- Name: cus_outstanding_customer_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX cus_outstanding_customer_id ON public.cus_outstanding USING btree (customer_id);


--
-- Name: cus_outstanding_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX cus_outstanding_sale_id ON public.cus_outstanding USING btree (sale_id);


--
-- Name: cus_payments_customer_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX cus_payments_customer_id ON public.cus_payments USING btree (customer_id);


--
-- Name: cus_payments_idx_cus_payments_balance_entry_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX cus_payments_idx_cus_payments_balance_entry_id ON public.cus_payments USING btree (balance_entry_id);


--
-- Name: cus_payments_idx_cus_payments_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX cus_payments_idx_cus_payments_store_id ON public.cus_payments USING btree (store_id);


--
-- Name: cus_payments_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX cus_payments_sale_id ON public.cus_payments USING btree (sale_id);


--
-- Name: customer_balance_entries_idx_customer_balance_customer; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customer_balance_entries_idx_customer_balance_customer ON public.customer_balance_entries USING btree (customer_id);


--
-- Name: customer_balance_entries_idx_customer_balance_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customer_balance_entries_idx_customer_balance_status ON public.customer_balance_entries USING btree (status);


--
-- Name: customer_balance_entries_idx_customer_balance_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customer_balance_entries_idx_customer_balance_type ON public.customer_balance_entries USING btree (entry_type);


--
-- Name: customer_subscription_invoices_idx_customer_subscription_invoic; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customer_subscription_invoices_idx_customer_subscription_invoic ON public.customer_subscription_invoices USING btree (period_end);


--
-- Name: customer_subscriptions_idx_customer_subscriptions_customer_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customer_subscriptions_idx_customer_subscriptions_customer_id ON public.customer_subscriptions USING btree (customer_id);


--
-- Name: customer_subscriptions_idx_customer_subscriptions_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customer_subscriptions_idx_customer_subscriptions_item_id ON public.customer_subscriptions USING btree (item_id);


--
-- Name: customer_subscriptions_idx_customer_subscriptions_period_end; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customer_subscriptions_idx_customer_subscriptions_period_end ON public.customer_subscriptions USING btree (current_period_end);


--
-- Name: customer_subscriptions_idx_customer_subscriptions_plan_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customer_subscriptions_idx_customer_subscriptions_plan_id ON public.customer_subscriptions USING btree (subscription_plan_id);


--
-- Name: customer_subscriptions_idx_customer_subscriptions_renewal_date; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customer_subscriptions_idx_customer_subscriptions_renewal_date ON public.customer_subscriptions USING btree (next_renewal_date);


--
-- Name: customer_subscriptions_idx_customer_subscriptions_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customer_subscriptions_idx_customer_subscriptions_status ON public.customer_subscriptions USING btree (status);


--
-- Name: customer_subscriptions_idx_customer_subscriptions_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customer_subscriptions_idx_customer_subscriptions_store_id ON public.customer_subscriptions USING btree (store_id);


--
-- Name: customers_idx_customers_is_walk_in; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customers_idx_customers_is_walk_in ON public.customers USING btree (is_walk_in);


--
-- Name: customers_idx_customers_name; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customers_idx_customers_name ON public.customers USING btree (name);


--
-- Name: customers_idx_customers_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX customers_idx_customers_store_id ON public.customers USING btree (primary_store_id);


--
-- Name: deal_items_category_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX deal_items_category_id ON public.deal_items USING btree (category_id);


--
-- Name: deal_items_deal_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX deal_items_deal_id ON public.deal_items USING btree (deal_id);


--
-- Name: deal_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX deal_items_item_id ON public.deal_items USING btree (item_id);


--
-- Name: deal_items_selection_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX deal_items_selection_type ON public.deal_items USING btree (selection_type);


--
-- Name: deal_items_sub_category_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX deal_items_sub_category_id ON public.deal_items USING btree (sub_category_id);


--
-- Name: deals_is_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX deals_is_active ON public.deals USING btree (is_active);


--
-- Name: delivery_orders_customer_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX delivery_orders_customer_id ON public.delivery_orders USING btree (customer_id);


--
-- Name: delivery_orders_idx_delivery_orders_created; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX delivery_orders_idx_delivery_orders_created ON public.delivery_orders USING btree (created_at);


--
-- Name: delivery_orders_idx_delivery_orders_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX delivery_orders_idx_delivery_orders_store_id ON public.delivery_orders USING btree (store_id);


--
-- Name: delivery_orders_rider_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX delivery_orders_rider_id ON public.delivery_orders USING btree (rider_id);


--
-- Name: delivery_orders_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX delivery_orders_sale_id ON public.delivery_orders USING btree (sale_id);


--
-- Name: delivery_riders_idx_delivery_riders_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX delivery_riders_idx_delivery_riders_store_id ON public.delivery_riders USING btree (assigned_store_id);


--
-- Name: dinein_floors_idx_dinein_floors_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX dinein_floors_idx_dinein_floors_store_id ON public.dinein_floors USING btree (store_id);


--
-- Name: dinein_tables_floor_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX dinein_tables_floor_id ON public.dinein_tables USING btree (floor_id);


--
-- Name: dinein_tables_idx_dinein_tables_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX dinein_tables_idx_dinein_tables_store_id ON public.dinein_tables USING btree (store_id);


--
-- Name: discounts_idx_category_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX discounts_idx_category_id ON public.discounts USING btree (category_id);


--
-- Name: expense_accounts_category_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expense_accounts_category_id ON public.expense_accounts USING btree (category_id);


--
-- Name: expense_accounts_idx_chart_of_account_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expense_accounts_idx_chart_of_account_id ON public.expense_accounts USING btree (chart_of_account_id);


--
-- Name: expense_accounts_idx_mapped_at; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expense_accounts_idx_mapped_at ON public.expense_accounts USING btree (mapped_at);


--
-- Name: expense_accounts_subcategory_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expense_accounts_subcategory_id ON public.expense_accounts USING btree (subcategory_id);


--
-- Name: expense_subcategories_category_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expense_subcategories_category_id ON public.expense_subcategories USING btree (category_id);


--
-- Name: expenses_account_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expenses_account_id ON public.expenses USING btree (account_id);


--
-- Name: expenses_bank_account_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expenses_bank_account_id ON public.expenses USING btree (bank_account_id);


--
-- Name: expenses_idx_expenses_approved_at; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expenses_idx_expenses_approved_at ON public.expenses USING btree (approved_at);


--
-- Name: expenses_idx_expenses_approved_by; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expenses_idx_expenses_approved_by ON public.expenses USING btree (approved_by);


--
-- Name: expenses_idx_expenses_shift_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expenses_idx_expenses_shift_id ON public.expenses USING btree (shift_id);


--
-- Name: expenses_idx_expenses_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expenses_idx_expenses_status ON public.expenses USING btree (status);


--
-- Name: expenses_idx_expenses_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expenses_idx_expenses_store_id ON public.expenses USING btree (store_id);


--
-- Name: expenses_idx_reversal_journal; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expenses_idx_reversal_journal ON public.expenses USING btree (reversal_journal_id);


--
-- Name: expenses_idx_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expenses_idx_status ON public.expenses USING btree (status);


--
-- Name: expenses_journal_entry_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX expenses_journal_entry_id ON public.expenses USING btree (journal_entry_id);


--
-- Name: fbr_invoices_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fbr_invoices_sale_id ON public.fbr_invoices USING btree (sale_id);


--
-- Name: fiscal_period_setup_idx_open_year; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fiscal_period_setup_idx_open_year ON public.fiscal_period_setup USING btree (open_year);


--
-- Name: fiscal_periods_idx_end_date; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fiscal_periods_idx_end_date ON public.fiscal_periods USING btree (end_date);


--
-- Name: fiscal_periods_idx_is_closed; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fiscal_periods_idx_is_closed ON public.fiscal_periods USING btree (is_closed);


--
-- Name: fiscal_periods_idx_period_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fiscal_periods_idx_period_status ON public.fiscal_periods USING btree (period_status);


--
-- Name: fiscal_periods_idx_start_date; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX fiscal_periods_idx_start_date ON public.fiscal_periods USING btree (start_date);


--
-- Name: hold_items_idx_hold_id_item; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_items_idx_hold_id_item ON public.hold_items USING btree (hold_id, item_id);


--
-- Name: hold_items_idx_hold_items_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_items_idx_hold_items_store_id ON public.hold_items USING btree (store_id);


--
-- Name: hold_items_idx_hold_void; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_items_idx_hold_void ON public.hold_items USING btree (hold_id, void_status);


--
-- Name: hold_items_idx_is_deal; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_items_idx_is_deal ON public.hold_items USING btree (is_deal);


--
-- Name: hold_items_idx_void_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_items_idx_void_status ON public.hold_items USING btree (void_status);


--
-- Name: hold_orders_idx_customer_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_orders_idx_customer_id ON public.hold_orders USING btree (customer_id);


--
-- Name: hold_orders_idx_discount_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_orders_idx_discount_id ON public.hold_orders USING btree (discount_id);


--
-- Name: hold_orders_idx_hold_orders_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_orders_idx_hold_orders_store_id ON public.hold_orders USING btree (store_id);


--
-- Name: hold_orders_idx_order_mode_table; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_orders_idx_order_mode_table ON public.hold_orders USING btree (order_mode, table_id);


--
-- Name: hold_orders_idx_order_taker_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_orders_idx_order_taker_id ON public.hold_orders USING btree (order_taker_id);


--
-- Name: hold_orders_idx_shift_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_orders_idx_shift_id ON public.hold_orders USING btree (shift_id);


--
-- Name: hold_orders_idx_table_id_created; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_orders_idx_table_id_created ON public.hold_orders USING btree (table_id, created_at);


--
-- Name: hold_orders_idx_token_shift; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX hold_orders_idx_token_shift ON public.hold_orders USING btree (shift_id, token_number);


--
-- Name: idx_branch_access_branch; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX idx_branch_access_branch ON public.branch_access USING btree (branch_id);


--
-- Name: idx_branch_access_user; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX idx_branch_access_user ON public.branch_access USING btree (user_id);


--
-- Name: inventory_movements_idx_inventory_movements_branch_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX inventory_movements_idx_inventory_movements_branch_id ON public.inventory_movements USING btree (branch_id);


--
-- Name: inventory_movements_idx_inventory_movements_branch_store; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX inventory_movements_idx_inventory_movements_branch_store ON public.inventory_movements USING btree (branch_id, store_id);


--
-- Name: inventory_movements_idx_inventory_movements_created_at; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX inventory_movements_idx_inventory_movements_created_at ON public.inventory_movements USING btree (created_at);


--
-- Name: inventory_movements_idx_inventory_movements_item_reference; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX inventory_movements_idx_inventory_movements_item_reference ON public.inventory_movements USING btree (item_id, reference_type, reference_id);


--
-- Name: inventory_movements_idx_inventory_movements_reference; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX inventory_movements_idx_inventory_movements_reference ON public.inventory_movements USING btree (reference_type, reference_id);


--
-- Name: inventory_movements_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX inventory_movements_item_id ON public.inventory_movements USING btree (item_id);


--
-- Name: inventory_movements_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX inventory_movements_store_id ON public.inventory_movements USING btree (store_id);


--
-- Name: item_barcodes_idx_item_barcodes_item_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_barcodes_idx_item_barcodes_item_active ON public.item_barcodes USING btree (item_id, is_active);


--
-- Name: item_barcodes_idx_item_barcodes_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_barcodes_idx_item_barcodes_item_id ON public.item_barcodes USING btree (item_id);


--
-- Name: item_line_discounts_idx_item_line_discounts_active_dates; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_line_discounts_idx_item_line_discounts_active_dates ON public.item_line_discounts USING btree (is_active, expires_at, starts_at);


--
-- Name: item_modifier_group_assignments_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_modifier_group_assignments_item_id ON public.item_modifier_group_assignments USING btree (item_id);


--
-- Name: item_modifier_group_assignments_modifier_group_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_modifier_group_assignments_modifier_group_id ON public.item_modifier_group_assignments USING btree (modifier_group_id);


--
-- Name: item_modifier_groups_is_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_modifier_groups_is_active ON public.item_modifier_groups USING btree (is_active);


--
-- Name: item_modifier_groups_sort_order; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_modifier_groups_sort_order ON public.item_modifier_groups USING btree (sort_order);


--
-- Name: item_modifiers_is_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_modifiers_is_active ON public.item_modifiers USING btree (is_active);


--
-- Name: item_modifiers_sort_order; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_modifiers_sort_order ON public.item_modifiers USING btree (sort_order);


--
-- Name: item_serial_transactions_idx_st_doc; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_serial_transactions_idx_st_doc ON public.item_serial_transactions USING btree (doc_type, doc_id);


--
-- Name: item_serial_transactions_idx_st_item; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_serial_transactions_idx_st_item ON public.item_serial_transactions USING btree (item_id);


--
-- Name: item_serial_transactions_idx_st_serial; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_serial_transactions_idx_st_serial ON public.item_serial_transactions USING btree (serial_id);


--
-- Name: item_serial_transactions_idx_st_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_serial_transactions_idx_st_type ON public.item_serial_transactions USING btree (trans_type);


--
-- Name: item_serials_idx_serial_branch; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_serials_idx_serial_branch ON public.item_serials USING btree (branch_id);


--
-- Name: item_serials_idx_serial_item; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_serials_idx_serial_item ON public.item_serials USING btree (item_id);


--
-- Name: item_serials_idx_serial_no; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_serials_idx_serial_no ON public.item_serials USING btree (serial_no);


--
-- Name: item_serials_idx_serial_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX item_serials_idx_serial_status ON public.item_serials USING btree (status_code);


--
-- Name: items_category_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_category_id ON public.items USING btree (category_id);


--
-- Name: items_idx_display_color; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_idx_display_color ON public.items USING btree (display_color);


--
-- Name: items_idx_items_category_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_idx_items_category_id ON public.items USING btree (category_id);


--
-- Name: items_idx_items_is_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_idx_items_is_active ON public.items USING btree (is_active);


--
-- Name: items_idx_items_is_serialized; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_idx_items_is_serialized ON public.items USING btree (is_serialized);


--
-- Name: items_idx_items_item_code; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_idx_items_item_code ON public.items USING btree (item_code);


--
-- Name: items_idx_items_item_role; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_idx_items_item_role ON public.items USING btree (item_role);


--
-- Name: items_idx_items_name; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_idx_items_name ON public.items USING btree (name);


--
-- Name: items_idx_items_sub_category_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_idx_items_sub_category_id ON public.items USING btree (sub_category_id);


--
-- Name: items_idx_items_supplier_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_idx_items_supplier_id ON public.items USING btree (supplier_id);


--
-- Name: items_sub_category_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_sub_category_id ON public.items USING btree (sub_category_id);


--
-- Name: items_tax_rate_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_tax_rate_id ON public.items USING btree (tax_rate_id);


--
-- Name: items_uom_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX items_uom_id ON public.items USING btree (uom_id);


--
-- Name: journal_entries_idx_branch_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX journal_entries_idx_branch_id ON public.journal_entries USING btree (branch_id);


--
-- Name: journal_entries_idx_entry_date; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX journal_entries_idx_entry_date ON public.journal_entries USING btree (entry_date);


--
-- Name: journal_entries_idx_entry_number; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX journal_entries_idx_entry_number ON public.journal_entries USING btree (entry_number);


--
-- Name: journal_entries_idx_period_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX journal_entries_idx_period_id ON public.journal_entries USING btree (period_id);


--
-- Name: journal_entries_idx_reference_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX journal_entries_idx_reference_id ON public.journal_entries USING btree (reference_id);


--
-- Name: journal_entries_idx_source_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX journal_entries_idx_source_type ON public.journal_entries USING btree (source_type);


--
-- Name: journal_entries_idx_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX journal_entries_idx_status ON public.journal_entries USING btree (status);


--
-- Name: journal_entries_idx_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX journal_entries_idx_store_id ON public.journal_entries USING btree (store_id);


--
-- Name: journal_entries_idx_user_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX journal_entries_idx_user_id ON public.journal_entries USING btree (user_id);


--
-- Name: journal_entry_lines_idx_account_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX journal_entry_lines_idx_account_id ON public.journal_entry_lines USING btree (account_id);


--
-- Name: journal_entry_lines_idx_journal_entry_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX journal_entry_lines_idx_journal_entry_id ON public.journal_entry_lines USING btree (journal_entry_id);


--
-- Name: kds_activity_log_created_at; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_activity_log_created_at ON public.kds_activity_log USING btree (created_at);


--
-- Name: kds_activity_log_idx_kds_activity_log_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_activity_log_idx_kds_activity_log_store_id ON public.kds_activity_log USING btree (store_id);


--
-- Name: kds_activity_log_kds_order_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_activity_log_kds_order_id ON public.kds_activity_log USING btree (kds_order_id);


--
-- Name: kds_activity_log_kds_order_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_activity_log_kds_order_item_id ON public.kds_activity_log USING btree (kds_order_item_id);


--
-- Name: kds_activity_log_user_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_activity_log_user_id ON public.kds_activity_log USING btree (user_id);


--
-- Name: kds_cleanup_log_idx_cleanup_date; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_cleanup_log_idx_cleanup_date ON public.kds_cleanup_log USING btree (cleanup_date);


--
-- Name: kds_cleanup_log_idx_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_cleanup_log_idx_status ON public.kds_cleanup_log USING btree (status);


--
-- Name: kds_order_items_hold_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_order_items_hold_item_id ON public.kds_order_items USING btree (hold_item_id);


--
-- Name: kds_order_items_idx_kds_order_items_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_order_items_idx_kds_order_items_store_id ON public.kds_order_items USING btree (store_id);


--
-- Name: kds_order_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_order_items_item_id ON public.kds_order_items USING btree (item_id);


--
-- Name: kds_order_items_item_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_order_items_item_status ON public.kds_order_items USING btree (item_status);


--
-- Name: kds_order_items_kds_order_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_order_items_kds_order_id ON public.kds_order_items USING btree (kds_order_id);


--
-- Name: kds_order_items_sale_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_order_items_sale_item_id ON public.kds_order_items USING btree (sale_item_id);


--
-- Name: kds_orders_created_at; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_orders_created_at ON public.kds_orders USING btree (created_at);


--
-- Name: kds_orders_hold_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_orders_hold_id ON public.kds_orders USING btree (hold_id);


--
-- Name: kds_orders_idx_kds_orders_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_orders_idx_kds_orders_store_id ON public.kds_orders USING btree (store_id);


--
-- Name: kds_orders_idx_order_taker_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_orders_idx_order_taker_id ON public.kds_orders USING btree (order_taker_id);


--
-- Name: kds_orders_idx_parent_order; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_orders_idx_parent_order ON public.kds_orders USING btree (parent_order_id);


--
-- Name: kds_orders_idx_sequence; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_orders_idx_sequence ON public.kds_orders USING btree (order_sequence);


--
-- Name: kds_orders_order_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_orders_order_status ON public.kds_orders USING btree (order_status);


--
-- Name: kds_orders_priority; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_orders_priority ON public.kds_orders USING btree (priority);


--
-- Name: kds_orders_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_orders_sale_id ON public.kds_orders USING btree (sale_id);


--
-- Name: kds_settings_idx_kds_settings_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_settings_idx_kds_settings_store_id ON public.kds_settings USING btree (store_id);


--
-- Name: kds_station_items_idx_kds_station_items_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_station_items_idx_kds_station_items_store_id ON public.kds_station_items USING btree (store_id);


--
-- Name: kds_station_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_station_items_item_id ON public.kds_station_items USING btree (item_id);


--
-- Name: kds_station_items_station_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_station_items_station_id ON public.kds_station_items USING btree (station_id);


--
-- Name: kds_stations_idx_kds_stations_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_stations_idx_kds_stations_store_id ON public.kds_stations USING btree (store_id);


--
-- Name: kds_stations_idx_printer_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kds_stations_idx_printer_id ON public.kds_stations USING btree (printer_id);


--
-- Name: kpra_invoices_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kpra_invoices_sale_id ON public.kpra_invoices USING btree (sale_id);


--
-- Name: kpra_logs_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX kpra_logs_sale_id ON public.kpra_logs USING btree (sale_id);


--
-- Name: modifier_group_assignments_modifier_group_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX modifier_group_assignments_modifier_group_id ON public.modifier_group_assignments USING btree (modifier_group_id);


--
-- Name: modifier_group_assignments_modifier_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX modifier_group_assignments_modifier_id ON public.modifier_group_assignments USING btree (modifier_id);


--
-- Name: order_takers_idx_employee_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX order_takers_idx_employee_id ON public.order_takers USING btree (employee_id);


--
-- Name: order_takers_idx_order_takers_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX order_takers_idx_order_takers_store_id ON public.order_takers USING btree (assigned_store_id);


--
-- Name: order_takers_idx_user_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX order_takers_idx_user_id ON public.order_takers USING btree (user_id);


--
-- Name: print_devices_idx_print_devices_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX print_devices_idx_print_devices_active ON public.print_devices USING btree (is_active);


--
-- Name: print_devices_idx_print_devices_default; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX print_devices_idx_print_devices_default ON public.print_devices USING btree (is_default);


--
-- Name: print_devices_idx_print_devices_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX print_devices_idx_print_devices_type ON public.print_devices USING btree (print_type);


--
-- Name: print_devices_idx_terminal_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX print_devices_idx_terminal_id ON public.print_devices USING btree (terminal_id);


--
-- Name: production_cost_lines_idx_production_cost_lines_item; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX production_cost_lines_idx_production_cost_lines_item ON public.production_cost_lines USING btree (production_item_id);


--
-- Name: production_items_finish_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX production_items_finish_store_id ON public.production_items USING btree (finish_store_id);


--
-- Name: production_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX production_items_item_id ON public.production_items USING btree (item_id);


--
-- Name: production_items_material_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX production_items_material_store_id ON public.production_items USING btree (material_store_id);


--
-- Name: production_items_production_order_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX production_items_production_order_id ON public.production_items USING btree (production_order_id);


--
-- Name: production_items_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX production_items_status ON public.production_items USING btree (status);


--
-- Name: production_materials_material_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX production_materials_material_item_id ON public.production_materials USING btree (material_item_id);


--
-- Name: production_materials_production_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX production_materials_production_item_id ON public.production_materials USING btree (production_item_id);


--
-- Name: production_orders_created_by; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX production_orders_created_by ON public.production_orders USING btree (created_by);


--
-- Name: production_orders_production_date; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX production_orders_production_date ON public.production_orders USING btree (production_date);


--
-- Name: production_orders_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX production_orders_status ON public.production_orders USING btree (status);


--
-- Name: purchase_items_idx_purchase_items_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_items_idx_purchase_items_store_id ON public.purchase_items USING btree (store_id);


--
-- Name: purchase_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_items_item_id ON public.purchase_items USING btree (item_id);


--
-- Name: purchase_items_purchase_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_items_purchase_id ON public.purchase_items USING btree (purchase_id);


--
-- Name: purchase_order_items_idx_poi_item; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_order_items_idx_poi_item ON public.purchase_order_items USING btree (item_id);


--
-- Name: purchase_order_items_idx_poi_po; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_order_items_idx_poi_po ON public.purchase_order_items USING btree (purchase_order_id);


--
-- Name: purchase_orders_idx_po_branch_store; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_orders_idx_po_branch_store ON public.purchase_orders USING btree (branch_id, store_id);


--
-- Name: purchase_orders_idx_po_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_orders_idx_po_status ON public.purchase_orders USING btree (status);


--
-- Name: purchase_orders_idx_po_vendor; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_orders_idx_po_vendor ON public.purchase_orders USING btree (vendor_id);


--
-- Name: purchase_return_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_return_items_item_id ON public.purchase_return_items USING btree (item_id);


--
-- Name: purchase_return_items_purchase_return_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_return_items_purchase_return_id ON public.purchase_return_items USING btree (purchase_return_id);


--
-- Name: purchase_returns_idx_purchase_returns_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_returns_idx_purchase_returns_store_id ON public.purchase_returns USING btree (store_id);


--
-- Name: purchase_returns_purchase_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_returns_purchase_id ON public.purchase_returns USING btree (purchase_id);


--
-- Name: purchase_returns_vendor_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchase_returns_vendor_id ON public.purchase_returns USING btree (vendor_id);


--
-- Name: purchases_idx_purchases_branch_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchases_idx_purchases_branch_id ON public.purchases USING btree (branch_id);


--
-- Name: purchases_idx_purchases_branch_store; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchases_idx_purchases_branch_store ON public.purchases USING btree (branch_id, store_id);


--
-- Name: purchases_idx_purchases_source_po_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchases_idx_purchases_source_po_id ON public.purchases USING btree (source_po_id);


--
-- Name: purchases_idx_purchases_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchases_idx_purchases_store_id ON public.purchases USING btree (store_id);


--
-- Name: purchases_vendor_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX purchases_vendor_id ON public.purchases USING btree (vendor_id);


--
-- Name: quotation_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX quotation_items_item_id ON public.quotation_items USING btree (item_id);


--
-- Name: quotation_items_quotation_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX quotation_items_quotation_id ON public.quotation_items USING btree (quotation_id);


--
-- Name: quotations_idx_quotations_customer_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX quotations_idx_quotations_customer_id ON public.quotations USING btree (customer_id);


--
-- Name: quotations_idx_quotations_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX quotations_idx_quotations_status ON public.quotations USING btree (status);


--
-- Name: quotations_idx_quotations_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX quotations_idx_quotations_store_id ON public.quotations USING btree (store_id);


--
-- Name: role_rights_right_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX role_rights_right_id ON public.role_rights USING btree (right_id);


--
-- Name: sale_item_modifiers_modifier_group_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_item_modifiers_modifier_group_id ON public.sale_item_modifiers USING btree (modifier_group_id);


--
-- Name: sale_item_modifiers_modifier_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_item_modifiers_modifier_id ON public.sale_item_modifiers USING btree (modifier_id);


--
-- Name: sale_item_modifiers_sale_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_item_modifiers_sale_item_id ON public.sale_item_modifiers USING btree (sale_item_id);


--
-- Name: sale_items_idx_is_deal; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_items_idx_is_deal ON public.sale_items USING btree (is_deal);


--
-- Name: sale_items_idx_sale_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_items_idx_sale_items_item_id ON public.sale_items USING btree (item_id);


--
-- Name: sale_items_idx_sale_items_item_sale; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_items_idx_sale_items_item_sale ON public.sale_items USING btree (item_id, sale_id);


--
-- Name: sale_items_idx_sale_items_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_items_idx_sale_items_sale_id ON public.sale_items USING btree (sale_id);


--
-- Name: sale_items_idx_sale_items_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_items_idx_sale_items_store_id ON public.sale_items USING btree (store_id);


--
-- Name: sale_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_items_item_id ON public.sale_items USING btree (item_id);


--
-- Name: sale_items_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_items_sale_id ON public.sale_items USING btree (sale_id);


--
-- Name: sale_return_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_return_items_item_id ON public.sale_return_items USING btree (item_id);


--
-- Name: sale_return_items_sale_return_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_return_items_sale_return_id ON public.sale_return_items USING btree (sale_return_id);


--
-- Name: sale_returns_customer_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_returns_customer_id ON public.sale_returns USING btree (customer_id);


--
-- Name: sale_returns_idx_sale_returns_bank_account; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_returns_idx_sale_returns_bank_account ON public.sale_returns USING btree (bank_account_id);


--
-- Name: sale_returns_idx_sale_returns_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_returns_idx_sale_returns_store_id ON public.sale_returns USING btree (store_id);


--
-- Name: sale_returns_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sale_returns_sale_id ON public.sale_returns USING btree (sale_id);


--
-- Name: sales_idx_customer_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_customer_id ON public.sales USING btree (customer_id);


--
-- Name: sales_idx_discount_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_discount_id ON public.sales USING btree (discount_id);


--
-- Name: sales_idx_kpra_enabled; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_kpra_enabled ON public.sales USING btree (is_kpra_enabled);


--
-- Name: sales_idx_number_of_guests; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_number_of_guests ON public.sales USING btree (number_of_guests);


--
-- Name: sales_idx_order_taker_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_order_taker_id ON public.sales USING btree (order_taker_id);


--
-- Name: sales_idx_payment_method; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_payment_method ON public.sales USING btree (payment_method);


--
-- Name: sales_idx_sales_branch_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_sales_branch_id ON public.sales USING btree (branch_id);


--
-- Name: sales_idx_sales_branch_store; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_sales_branch_store ON public.sales USING btree (branch_id, store_id);


--
-- Name: sales_idx_sales_customer_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_sales_customer_id ON public.sales USING btree (customer_id);


--
-- Name: sales_idx_sales_date; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_sales_date ON public.sales USING btree (sale_date);


--
-- Name: sales_idx_sales_invoice_number; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_sales_invoice_number ON public.sales USING btree (invoice_number);


--
-- Name: sales_idx_sales_order_mode; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_sales_order_mode ON public.sales USING btree (order_mode);


--
-- Name: sales_idx_sales_sale_date; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_sales_sale_date ON public.sales USING btree (sale_date);


--
-- Name: sales_idx_sales_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_sales_store_id ON public.sales USING btree (store_id);


--
-- Name: sales_idx_sales_terminal_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_sales_terminal_id ON public.sales USING btree (terminal_id);


--
-- Name: sales_idx_sales_zatca_phase2_invoice_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_sales_zatca_phase2_invoice_id ON public.sales USING btree (zatca_phase2_invoice_id);


--
-- Name: sales_idx_tip_amount; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sales_idx_tip_amount ON public.sales USING btree (tip_amount);


--
-- Name: setting_options_setting_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX setting_options_setting_id ON public.setting_options USING btree (setting_id);


--
-- Name: settings_category_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX settings_category_id ON public.settings USING btree (category_id);


--
-- Name: settings_idx_settings_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX settings_idx_settings_store_id ON public.settings USING btree (store_id);


--
-- Name: shift_logs_idx_shift_logs_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX shift_logs_idx_shift_logs_store_id ON public.shift_logs USING btree (store_id);


--
-- Name: shifts_fk_shifts_branch; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX shifts_fk_shifts_branch ON public.shifts USING btree (branch_id);


--
-- Name: shifts_idx_shifts_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX shifts_idx_shifts_store_id ON public.shifts USING btree (store_id);


--
-- Name: stock_adjustment_items_adjustment_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_adjustment_items_adjustment_id ON public.stock_adjustment_items USING btree (adjustment_id);


--
-- Name: stock_adjustment_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_adjustment_items_item_id ON public.stock_adjustment_items USING btree (item_id);


--
-- Name: stock_adjustments_adjustment_date; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_adjustments_adjustment_date ON public.stock_adjustments USING btree (adjustment_date);


--
-- Name: stock_adjustments_created_by; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_adjustments_created_by ON public.stock_adjustments USING btree (created_by);


--
-- Name: stock_adjustments_journal_entry_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_adjustments_journal_entry_id ON public.stock_adjustments USING btree (journal_entry_id);


--
-- Name: stock_adjustments_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_adjustments_store_id ON public.stock_adjustments USING btree (store_id);


--
-- Name: stock_transfer_items_idx_stock_transfer_items_from_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_transfer_items_idx_stock_transfer_items_from_store_id ON public.stock_transfer_items USING btree (from_store_id);


--
-- Name: stock_transfer_items_idx_stock_transfer_items_to_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_transfer_items_idx_stock_transfer_items_to_store_id ON public.stock_transfer_items USING btree (to_store_id);


--
-- Name: stock_transfer_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_transfer_items_item_id ON public.stock_transfer_items USING btree (item_id);


--
-- Name: stock_transfer_items_transfer_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_transfer_items_transfer_id ON public.stock_transfer_items USING btree (transfer_id);


--
-- Name: stock_transfers_from_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_transfers_from_store_id ON public.stock_transfers USING btree (from_store_id);


--
-- Name: stock_transfers_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_transfers_status ON public.stock_transfers USING btree (status);


--
-- Name: stock_transfers_to_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stock_transfers_to_store_id ON public.stock_transfers USING btree (to_store_id);


--
-- Name: store_inventory_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX store_inventory_item_id ON public.store_inventory USING btree (item_id);


--
-- Name: store_inventory_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX store_inventory_store_id ON public.store_inventory USING btree (store_id);


--
-- Name: stores_idx_stores_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stores_idx_stores_active ON public.stores USING btree (is_active);


--
-- Name: stores_idx_stores_branch_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX stores_idx_stores_branch_id ON public.stores USING btree (branch_id);


--
-- Name: sub_categories_category_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sub_categories_category_id ON public.sub_categories USING btree (category_id);


--
-- Name: sub_categories_idx_display_color; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sub_categories_idx_display_color ON public.sub_categories USING btree (display_color);


--
-- Name: subscription_plans_idx_subscription_plans_billing_interval; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX subscription_plans_idx_subscription_plans_billing_interval ON public.subscription_plans USING btree (billing_interval);


--
-- Name: subscription_plans_idx_subscription_plans_is_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX subscription_plans_idx_subscription_plans_is_active ON public.subscription_plans USING btree (is_active);


--
-- Name: subscription_plans_idx_subscription_plans_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX subscription_plans_idx_subscription_plans_store_id ON public.subscription_plans USING btree (store_id);


--
-- Name: sup_payments_idx_sup_payments_balance_entry_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sup_payments_idx_sup_payments_balance_entry_id ON public.sup_payments USING btree (balance_entry_id);


--
-- Name: sup_payments_idx_sup_payments_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX sup_payments_idx_sup_payments_store_id ON public.sup_payments USING btree (store_id);


--
-- Name: supplier_balance_entries_idx_supplier_balance_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX supplier_balance_entries_idx_supplier_balance_status ON public.supplier_balance_entries USING btree (status);


--
-- Name: supplier_balance_entries_idx_supplier_balance_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX supplier_balance_entries_idx_supplier_balance_type ON public.supplier_balance_entries USING btree (entry_type);


--
-- Name: supplier_balance_entries_idx_supplier_balance_vendor; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX supplier_balance_entries_idx_supplier_balance_vendor ON public.supplier_balance_entries USING btree (vendor_id);


--
-- Name: table_transfer_logs_idx_created_at; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX table_transfer_logs_idx_created_at ON public.table_transfer_logs USING btree (created_at);


--
-- Name: table_transfer_logs_idx_hold_order; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX table_transfer_logs_idx_hold_order ON public.table_transfer_logs USING btree (hold_order_id);


--
-- Name: table_transfer_logs_idx_source_table; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX table_transfer_logs_idx_source_table ON public.table_transfer_logs USING btree (source_table_id);


--
-- Name: table_transfer_logs_idx_target_table; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX table_transfer_logs_idx_target_table ON public.table_transfer_logs USING btree (target_table_id);


--
-- Name: table_transfer_logs_idx_transfer_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX table_transfer_logs_idx_transfer_type ON public.table_transfer_logs USING btree (transfer_type);


--
-- Name: table_transfer_logs_idx_transferred_by; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX table_transfer_logs_idx_transferred_by ON public.table_transfer_logs USING btree (transferred_by);


--
-- Name: tax_rates_idx_tax_rates_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX tax_rates_idx_tax_rates_id ON public.tax_rates USING btree (id);


--
-- Name: terminals_idx_branch_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX terminals_idx_branch_id ON public.terminals USING btree (branch_id);


--
-- Name: terminals_idx_is_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX terminals_idx_is_active ON public.terminals USING btree (is_active);


--
-- Name: terminals_idx_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX terminals_idx_store_id ON public.terminals USING btree (store_id);


--
-- Name: translations_key; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX translations_key ON public.translations USING btree (key);


--
-- Name: translations_language_code; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX translations_language_code ON public.translations USING btree (language_code);


--
-- Name: uoms_group_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX uoms_group_id ON public.uoms USING btree (group_id);


--
-- Name: user_language_preferences_language_code; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX user_language_preferences_language_code ON public.user_language_preferences USING btree (language_code);


--
-- Name: users_idx_email; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX users_idx_email ON public.users USING btree (email);


--
-- Name: users_idx_is_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX users_idx_is_active ON public.users USING btree (is_active);


--
-- Name: users_idx_profile_picture; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX users_idx_profile_picture ON public.users USING btree (profile_picture);


--
-- Name: users_idx_username; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX users_idx_username ON public.users USING btree (username);


--
-- Name: users_idx_users_default_branch_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX users_idx_users_default_branch_id ON public.users USING btree (default_branch_id);


--
-- Name: users_idx_users_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX users_idx_users_store_id ON public.users USING btree (assigned_store_id);


--
-- Name: users_role_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX users_role_id ON public.users USING btree (role_id);


--
-- Name: vendors_idx_vendors_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX vendors_idx_vendors_active ON public.vendors USING btree (is_active);


--
-- Name: vendors_idx_vendors_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX vendors_idx_vendors_store_id ON public.vendors USING btree (primary_store_id);


--
-- Name: void_items_idx_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX void_items_idx_item_id ON public.void_items USING btree (item_id);


--
-- Name: void_items_idx_source; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX void_items_idx_source ON public.void_items USING btree (source_type, source_id);


--
-- Name: void_items_idx_void_reason; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX void_items_idx_void_reason ON public.void_items USING btree (void_reason_id);


--
-- Name: void_items_idx_voided_at; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX void_items_idx_voided_at ON public.void_items USING btree (voided_at);


--
-- Name: void_items_idx_voided_by; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX void_items_idx_voided_by ON public.void_items USING btree (voided_by);


--
-- Name: void_orders_idx_void_orders_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX void_orders_idx_void_orders_store_id ON public.void_orders USING btree (store_id);


--
-- Name: void_orders_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX void_orders_sale_id ON public.void_orders USING btree (sale_id);


--
-- Name: void_orders_void_reason_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX void_orders_void_reason_id ON public.void_orders USING btree (void_reason_id);


--
-- Name: void_orders_voided_by; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX void_orders_voided_by ON public.void_orders USING btree (voided_by);


--
-- Name: wastage_branch_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX wastage_branch_id ON public.wastage USING btree (branch_id);


--
-- Name: wastage_created_by; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX wastage_created_by ON public.wastage USING btree (created_by);


--
-- Name: wastage_items_item_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX wastage_items_item_id ON public.wastage_items USING btree (item_id);


--
-- Name: wastage_items_wastage_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX wastage_items_wastage_id ON public.wastage_items USING btree (wastage_id);


--
-- Name: wastage_journal_entry_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX wastage_journal_entry_id ON public.wastage USING btree (journal_entry_id);


--
-- Name: wastage_store_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX wastage_store_id ON public.wastage USING btree (store_id);


--
-- Name: wastage_wastage_date; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX wastage_wastage_date ON public.wastage USING btree (wastage_date);


--
-- Name: zatca_invoices_invoice_date; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_invoices_invoice_date ON public.zatca_invoices USING btree (invoice_date);


--
-- Name: zatca_invoices_invoice_number; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_invoices_invoice_number ON public.zatca_invoices USING btree (invoice_number);


--
-- Name: zatca_invoices_invoice_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_invoices_invoice_type ON public.zatca_invoices USING btree (invoice_type);


--
-- Name: zatca_invoices_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_invoices_sale_id ON public.zatca_invoices USING btree (sale_id);


--
-- Name: zatca_phase2_api_logs_idx_zatca_p2_api_created; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_api_logs_idx_zatca_p2_api_created ON public.zatca_phase2_api_logs USING btree (created_at);


--
-- Name: zatca_phase2_api_logs_idx_zatca_p2_api_invoice; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_api_logs_idx_zatca_p2_api_invoice ON public.zatca_phase2_api_logs USING btree (zatca_phase2_invoice_id);


--
-- Name: zatca_phase2_api_logs_idx_zatca_p2_api_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_api_logs_idx_zatca_p2_api_status ON public.zatca_phase2_api_logs USING btree (response_status);


--
-- Name: zatca_phase2_certificates_idx_zatca_p2_cert_active; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_certificates_idx_zatca_p2_cert_active ON public.zatca_phase2_certificates USING btree (is_active);


--
-- Name: zatca_phase2_certificates_idx_zatca_p2_cert_env; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_certificates_idx_zatca_p2_cert_env ON public.zatca_phase2_certificates USING btree (environment);


--
-- Name: zatca_phase2_certificates_idx_zatca_p2_cert_store; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_certificates_idx_zatca_p2_cert_store ON public.zatca_phase2_certificates USING btree (store_id);


--
-- Name: zatca_phase2_device_state_idx_zatca_p2_device_store; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_device_state_idx_zatca_p2_device_store ON public.zatca_phase2_device_state USING btree (store_id);


--
-- Name: zatca_phase2_invoices_idx_zatca_p2_created_at; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_invoices_idx_zatca_p2_created_at ON public.zatca_phase2_invoices USING btree (created_at);


--
-- Name: zatca_phase2_invoices_idx_zatca_p2_invoice_number; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_invoices_idx_zatca_p2_invoice_number ON public.zatca_phase2_invoices USING btree (invoice_number);


--
-- Name: zatca_phase2_invoices_idx_zatca_p2_next_retry_at; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_invoices_idx_zatca_p2_next_retry_at ON public.zatca_phase2_invoices USING btree (next_retry_at);


--
-- Name: zatca_phase2_invoices_idx_zatca_p2_sale_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_invoices_idx_zatca_p2_sale_id ON public.zatca_phase2_invoices USING btree (sale_id);


--
-- Name: zatca_phase2_invoices_idx_zatca_p2_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_invoices_idx_zatca_p2_status ON public.zatca_phase2_invoices USING btree (status);


--
-- Name: zatca_phase2_jobs_idx_zatca_p2_jobs_invoice; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_jobs_idx_zatca_p2_jobs_invoice ON public.zatca_phase2_jobs USING btree (zatca_phase2_invoice_id);


--
-- Name: zatca_phase2_jobs_idx_zatca_p2_jobs_locked; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_jobs_idx_zatca_p2_jobs_locked ON public.zatca_phase2_jobs USING btree (locked_at);


--
-- Name: zatca_phase2_jobs_idx_zatca_p2_jobs_status_run; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_jobs_idx_zatca_p2_jobs_status_run ON public.zatca_phase2_jobs USING btree (status, run_after);


--
-- Name: zatca_phase2_status_history_idx_zatca_p2_hist_created; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_status_history_idx_zatca_p2_hist_created ON public.zatca_phase2_status_history USING btree (created_at);


--
-- Name: zatca_phase2_status_history_idx_zatca_p2_hist_invoice; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX zatca_phase2_status_history_idx_zatca_p2_hist_invoice ON public.zatca_phase2_status_history USING btree (zatca_phase2_invoice_id);


--
-- Name: item_barcodes fk_item_barcodes_item; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_barcodes
    ADD CONSTRAINT fk_item_barcodes_item FOREIGN KEY (item_id) REFERENCES public.items(id) ON DELETE CASCADE;


--
-- Name: item_line_discounts fk_item_line_discounts_item; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_line_discounts
    ADD CONSTRAINT fk_item_line_discounts_item FOREIGN KEY (item_id) REFERENCES public.items(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- Name: item_serial_transactions fk_serial_trans_serial; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.item_serial_transactions
    ADD CONSTRAINT fk_serial_trans_serial FOREIGN KEY (serial_id) REFERENCES public.item_serials(id) ON DELETE CASCADE;


--
--

\unrestrict 8Bn0DiBdwyyZoY4bUDdlX59Rhq4avppa9nlAgJT97U2JZUw8UfRjXZDrDptjqQm

