def mobile_delete_register(request, company_id): try: c = Company.objects.get(url_name=company_id) except Company.DoesNotExist: return JsonError(_("Company does not exist")) return manage_delete_object(request, c, Register, (_("You have no permission to delete registers"), _("Could not delete register")))
def delete_discount(request, company): return manage_delete_object(request, company, Discount, ( _("You have no permission to delete discounts"), _("Could not delete discount: ") ))
def delete_contact(request, company): return manage_delete_object(request, company, Contact, (_("You have no permission to delete contacts"), _("Could not delete contact")))
def delete_register(request, company): return manage_delete_object(request, company, Register, (_("You have no permission to delete registers"), _("Could not delete register")))