• I think you probably need the country part of the WHERE clause as below;

    select ledger_account, supplier_country, receiver_country, supplier_number, supplier_name, supplier_invoice_number, purchase_order_number, tran_type_po, document_number_po, invoice_amount,

    currency, invoice_amount_hc, vat_account_po, vat_amount_po, tran_type_app, document_number_app, vat_account_app, vat_amount_app

    from ADTRAN.ad_vat_recon

    where (finance_company = :comp or :comp=0)

    and fiscal_year = :year

    and fiscal_period between :fprd and :tprd

    and (supplier_country = receiver_country and (:ccty = 0 or trim(supplier_country) = :ccty ))

    Once you've established that the supplier and receiver country are the same, you only need to check one of them is equal to the input. Your main problem was that the AND takes precedence over the OR.