from core.views import (
    purchase_return_create, sale_return_create, 
    create_sale_return_api, create_purchase_return_api,
    Supplier, Product, Customer, SaleReturn, SaleReturnItem,
    PurchaseReturn, PurchaseReturnItem, transaction, timezone,
    decimal, json, JsonResponse, get_object_or_404, login_required, csrf_exempt, logger
)

def patch_purchase_return_create(request):
    suppliers = Supplier.objects.filter(is_active=True)
    products = Product.objects.filter(is_active=True)
    return {'suppliers': suppliers, 'products': products}

def patch_sale_return_create(request):
    customers = Customer.objects.all()
    products = Product.objects.filter(is_active=True)
    return {'customers': customers, 'products': products}
