<?php

return [
    'title'   => 'Sales History',
    'sub'     => 'Every completed sale across your stores.',
    'walk_in' => 'Walk-in',

    'actions' => [
        'open_cashier' => 'Open POS',
        'print'        => 'Print receipt',
        'view_receipt' => 'Open receipt page',
        'refund'       => 'Process refund',
        'view_refund'  => 'View refund',
        'void'         => 'Void sale',
    ],

    'confirm_void' => [
        'title'   => 'Void sale :number?',
        'message' => 'Stock returns to inventory; for credit sales the customer’s outstanding balance drops by the unpaid portion. Cash already paid must be handed back from the drawer — voiding does NOT auto-refund cash. Cannot be undone.',
        'confirm' => 'Void sale',
        'cancel'  => 'Cancel',
    ],

    'list' => [
        'title' => 'Recent sales (:count)',
    ],

    'columns' => [
        'number'      => 'Number',
        'date'        => 'Date',
        'store'       => 'Store',
        'customer'    => 'Customer',
        'cashier'     => 'Cashier',
        'method'      => 'Payment method',
        'status'      => 'Status',
        'grand_total' => 'Total',
    ],

    'summary' => [
        'total'        => 'Total sales',
        'transactions' => 'Transactions',
        'items'        => 'Items sold',
        'avg'          => 'Average sale',
    ],

    'filter' => [
        'status_all'    => 'All statuses',
        'method_all'    => 'All methods',
        'from'          => 'From',
        'to'            => 'To',
        'search'        => 'Search sale #, customer, cashier…',
        'customer'      => 'Customer',
        'customer_all'  => 'All customers',
        'customer_search' => 'Search customer…',
    ],

    'empty' => [
        'title' => 'No sales yet',
        'sub'   => 'Open the cashier to ring up your first sale.',
    ],

    'statuses' => [
        'draft'              => 'Draft',
        'held'               => 'Held',
        'completed'          => 'Completed',
        'voided'             => 'Voided',
        'partially_refunded' => 'Partially refunded',
        'refunded'           => 'Refunded',
    ],

    'sections' => [
        'items'          => 'Items',
        'payments'       => 'Payments',
        'totals'         => 'Totals',
        'customer'       => 'Customer',
        'notes'          => 'Notes',
        'refunds'        => 'Refunds against this sale',
        'record_payment' => 'Record payment',
    ],

    'gateway_refund' => [
        'reversed'       => 'Reversed at gateway',
        'reversed_short' => 'Reversed',
        'failed'         => 'Gateway reversal failed',
        'failed_short'   => 'Reversal failed',
        'retry'          => 'Retry reversal',
        'retry_failed'   => 'Could not reverse the charge. Please try again.',
    ],

    'items' => [
        'product'    => 'Product',
        'qty'        => 'Qty',
        'unit_price' => 'Unit price',
        'tax'        => 'Tax',
        'line_total' => 'Line total',
    ],

    'payments' => [
        'method'    => 'Method',
        'reference' => 'Reference',
        'paid_at'   => 'Paid at',
        'tendered'  => 'Tendered',
        'amount'    => 'Amount',
    ],

    'totals' => [
        'subtotal'             => 'Subtotal',
        'discount'             => 'Discount',
        'tax'                  => 'Tax',
        'tax_already_included' => 'Tax (already included)',
        'tax_incl_suffix'      => '(incl.)',
        'grand'                => 'Grand total',
        'paid'                 => 'Paid',
        'change'               => 'Change',
        'balance_due'          => 'Balance due',
    ],

    'payment_form' => [
        'sub'         => 'Pay down the outstanding balance on this sale.',
        'method'      => 'Method',
        'amount'      => 'Amount',
        'amount_help' => 'Up to :balance.',
        'reference'   => 'Reference (optional)',
        'submit'      => 'Record payment',
    ],

    'customer' => [
        'outstanding_total' => 'Total outstanding across this customer',
    ],

    'payment_methods' => [
        'cash'                      => 'Cash',
        'card_manual'               => 'Card / UPI (record only)',
        'stripe'                    => 'Stripe (card)',
        'razorpay'                  => 'Razorpay',
        'paystack'                  => 'Paystack',
        'flutterwave'               => 'Flutterwave',
        'mercado_pago'              => 'Mercado Pago',
        'stripe_default_line'       => 'POS sale',
        'razorpay_default_line'     => 'POS sale',
        'paystack_default_line'     => 'POS sale',
        'flutterwave_default_line'  => 'POS sale',
        'mercado_pago_default_line' => 'POS sale',
    ],

    'flash' => [
        'completed'        => 'Sale :number completed.',
        'payment_recorded' => 'Payment recorded.',
        'voided'           => 'Sale :number voided. Stock returned to inventory.',
    ],

    'receipt' => [
        'title'                => 'Receipt :number',
        'back'                 => 'Back',
        'print'                => 'Print',
        'customer'             => 'Customer',
        'cashier'              => 'Cashier',
        'gstin'                => 'GSTIN',
        'sku'                  => 'SKU',
        'hsn'                  => 'HSN',
        'hsn_summary'          => 'HSN summary',
        'hsn_col_code'         => 'HSN',
        'hsn_col_taxable'      => 'Taxable',
        'hsn_col_tax'          => 'Tax',
        'subtotal'             => 'Subtotal',
        'discount'             => 'Discount',
        'tax'                  => 'Tax',
        'tax_already_included' => 'Tax (already included)',
        'charges'              => 'Other charges',
        'rounding'             => 'Rounding',
        'grand_total'          => 'Total',
        'tendered'             => 'Tendered',
        'change'               => 'Change',
        'qr_caption'           => 'Scan to view',
    ],

    'flash_held' => [
        'parked'   => 'Order held as :number.',
        'resumed'  => 'Held order :number resumed.',
        'voided'   => 'Held order :number deleted.',
    ],

    'errors' => [
        'insufficient_stock' => 'Insufficient stock for ":name". Available: :available, requested: :requested.',
        'expired_batch_sale' => 'Cannot sell expired batch ":batch" of ":name" (expired :expiry). A manager with the override permission is required.',
        'discount_not_allowed'   => 'You don\'t have permission to apply discounts.',
        'discount_above_threshold' => 'This discount (:percent%) is above the :threshold% limit and needs a manager.',
        'discount_approval'      => [
            'invalid'        => 'That email and password don\'t match a user.',
            'inactive'       => 'That manager\'s account is inactive.',
            'not_authorized' => 'That user can\'t approve discounts above the limit.',
            'approved'       => 'Discount approved by :name.',
        ],
        'empty_cart'         => 'The cart is empty — add a product first.',
        'refund_empty'         => 'Pick at least one line to refund.',
        'refund_qty_zero'      => 'Refund quantity for ":name" must be greater than zero.',
        'refund_qty_exceeds'   => '":name" — only :remaining can still be refunded, not :requested.',
        'already_refunded'     => 'This sale is already fully refunded.',
        'credit_requires_customer' => 'Pick a customer before ringing up an on-account sale. Walk-in sales must be fully paid.',
        'credit_limit_exceeded'    => ':name would owe :new which is past their credit limit of :limit. Take a deposit or raise their limit.',
        'overpay_balance'          => 'Payment of :paid is more than the balance due :balance.',
        'sale_not_open_for_payment' => 'This sale has no outstanding balance.',
        'not_voidable' => [
            'status_held'                => 'A held order can be resumed or discarded — there is nothing to void.',
            'status_draft'               => 'Draft sales cannot be voided. Discard the cart instead.',
            'status_voided'              => 'This sale is already voided.',
            'status_partially_refunded'  => 'This sale has refunds against it. Use the refund flow to reverse remaining lines.',
            'status_refunded'            => 'This sale is fully refunded — voiding is not applicable.',
            'has_returns'                => 'This sale has refunds against it. Use the refund flow instead of voiding.',
            'shift_closed'               => 'The shift this sale belongs to is closed. Voiding it would falsify the Z-report — process a refund instead.',
        ],
    ],

    'discount_audit' => [
        'approved_by' => 'Approved by :name',
    ],

    'refund' => [
        'not_refundable'        => 'This sale is not in a refundable state.',
        'title'                 => 'Refund sale',
        'sub'                   => 'Pick the lines + quantities to refund. Stock is restocked by default; toggle off for damaged returns.',
        'reason'                => 'Reason',
        'reason_placeholder'    => 'Pick a reason',
        'method'                => 'Refund to',
        'method_placeholder'    => 'Use original method',
        'method_not_on_sale'    => 'Refund must use a payment method from the original sale.',
        'restock'               => 'Restock items',
        'restock_help'          => 'On by default — flip off when the items are damaged / scrap.',
        'notes'                 => 'Notes (optional)',
        'lines'                 => 'Lines',
        'line_qty'              => 'Refund qty',
        'line_remaining'        => 'of :n returnable',
        'restock_inherit'       => 'inherit',
        'restock_yes'           => 'restock',
        'restock_no'            => 'do NOT restock',
        'line_restock'          => 'Restock this line',
        'totals_subtotal'       => 'Refund subtotal',
        'totals_tax'            => 'Refund tax',
        'totals_grand'          => 'Refund total',
        'cancel'                => 'Cancel',
        'submit'                => 'Process refund',
        'flash'                 => [
            'created' => 'Refund :number processed.',
        ],
    ],
];
