Exemple #1
0
def _validate_item_details(args, item):
	from utilities.transaction_base import validate_item_fetch
	validate_item_fetch(args, item)
	
	# validate if purchase item or subcontracted item
	if item.is_purchase_item != "Yes":
		throw(_("Item") + (" %s: " % item.name) + _("not a purchase item"))
	
	if args.is_subcontracted == "Yes" and item.is_sub_contracted_item != "Yes":
		throw(_("Item") + (" %s: " % item.name) + 
			_("not a sub-contracted item.") +
			_("Please select a sub-contracted item or do not sub-contract the transaction."))
Exemple #2
0
def _validate_item_details(args, item):
	from utilities.transaction_base import validate_item_fetch
	validate_item_fetch(args, item)
	
	# validate if sales item or service item
	if args.order_type == "Maintenance":
		if item.is_service_item != "Yes":
			throw(_("Item") + (" %s: " % item.name) + 
				_("not a service item.") +
				_("Please select a service item or change the order type to Sales."))
		
	elif item.is_sales_item != "Yes":
		throw(_("Item") + (" %s: " % item.name) + _("not a sales item"))
Exemple #3
0
def _validate_item_details(args, item):
	from utilities.transaction_base import validate_item_fetch
	validate_item_fetch(args, item)
	
	# validate if purchase item or subcontracted item
	if item.is_purchase_item != "Yes":
		msgprint(_("Item") + (" %s: " % item.name) + _("not a purchase item"),
			raise_exception=True)
	
	if args.is_subcontracted == "Yes" and item.is_sub_contracted_item != "Yes":
		msgprint(_("Item") + (" %s: " % item.name) + 
			_("not a sub-contracted item.") +
			_("Please select a sub-contracted item or do not sub-contract the transaction."), 
			raise_exception=True)
Exemple #4
0
def _validate_item_details(args, item):
    from utilities.transaction_base import validate_item_fetch
    validate_item_fetch(args, item)

    # validate if sales item or service item
    if args.order_type == "Maintenance":
        if item.is_service_item != "Yes":
            throw(
                _("Item") + (" %s: " % item.name) + _("not a service item.") +
                _("Please select a service item or change the order type to Sales."
                  ))

    elif item.is_sales_item != "Yes":
        throw(_("Item") + (" %s: " % item.name) + _("not a sales item"))