How to make this query simpler
Well, at least it seems like you can get rid of the UNIONs. Use a CASE ... END to get the values for cashamount, creditnote, chequeamount and credit depending on paymenttypeid. Use IN (or multiple OR) to filter for paymenttypeid in the WHERE clause.

SELECT DISTINCT
       ih.invoiceno,
       c.name nameofcustomer,
       CASE ip.pamenttypeid
         WHEN 1
           THEN ip.amount
         ELSE
           0
       END cashamount,
       CASE ip.paymenttypeid
         WHEN 2
           THEN ip.amount
         ELSE
           0
       END creditnote,
       CASE ip.paymenttypeid
         WHEN 3
           THEN ip.amount
         ELSE
           0
       END chequeamount,
       CASE ip.paymenttypeid
         WHEN 4
           THEN ip.amount
         ELSE
           0
       END credit,
       ip.amount salesvalue 
       FROM invoiceheader ih
            LEFT JOIN customer c
                      ON c.id = ih.customerid
            LEFT JOIN invoicedetail id
                      ON id.invoiceno = ih.invoiceno
            LEFT JOIN distributioncenter dc
                      ON dc.id = id.distributioncenterid
            LEFT JOIN invoicepayment ip
                      ON ip.invoiceno = ih.invoiceno
       WHERE dc.id = 1
             AND ip.paymenttypeid IN (1, 2, 3, 4)
             AND ip.invoicedate BETWEEN '2018/05/01'
                                        AND '2018/06/19'
             AND ih.deleted = 0;


Note, that UNION eliminates duplicates. So I added DISTINCT to have duplicates eliminated in this version too. Remove it, if this side effect of UNION wasn't actually wanted or if there cannot be any duplicates (I don't have the complete picture of your schema to judge that.).

But, it's only a shorter query text. Depending on the existing indexes, your first approach might execute faster. Check the execution plans, when in doubt.