added coupon filtering by publication status and fixed auto coupon calculation issue, fixes dioscouri/amritasingh-f3#330