function makeVariant(attr1, attr2, attr3){
		//// console.log(_sku);
		// var prefix_sku = $scope.product.prefix+'-'+_sku;
		//_sku++;

		let variant = {
			//supplier_price 		: $scope.product.supplier_price,
			supplier_price      : $scope.product.product_variants[$scope.product.product_variants.length - 1].supplier_price,
			markup 				: $scope.product.markup,
			retail_price 		: $scope.product.product_variants[$scope.product.product_variants.length - 1].retail_price,
			markup              : (($scope.product.product_variants[$scope.product.product_variants.length - 1].retail_price 
								 - $scope.product.product_variants[$scope.product.product_variants.length - 1].supplier_price)
								 *100)/$scope.product.product_variants[$scope.product.product_variants.length - 1].supplier_price,
			sku 				: '',
			//sku 				: ( $scope.product.sku_number && !$scope.product.sku_custom ? _sku++ : $scope.getNamedSku() ),
			supplier_code 		: $scope.product.supplier_code,
			custom_loyalty      : $scope.product.custom_loyalty,
			quantity            : $scope.product.quantity,
			quantity            : 50,

			attribute_value_1 	: attr1,
			attribute_value_2 	: attr2,
			attribute_value_3 	: attr3,
			before_discount_price : $scope.product.product_variants[$scope.product.product_variants.length - 1].before_discount_price,
		}


		return variant;
	}
/*simply create and return new variant object*/
simply create and return new variant object
simply create and return new variant object
function makeVariant(attr1, attr2, attr3){
		let variant = {
			supplier_price      : $scope.product.product_variants[$scope.product.product_variants.length - 1].supplier_price,
			markup 				: $scope.product.markup,
			retail_price 		: $scope.product.product_variants[$scope.product.product_variants.length - 1].retail_price,
			markup              : (($scope.product.product_variants[$scope.product.product_variants.length - 1].retail_price 
								 - $scope.product.product_variants[$scope.product.product_variants.length - 1].supplier_price)
								 *100)/$scope.product.product_variants[$scope.product.product_variants.length - 1].supplier_price,
			sku 				: '',
			supplier_code 		: $scope.product.supplier_code,
			custom_loyalty      : $scope.product.custom_loyalty,
			quantity            : $scope.product.quantity,
			quantity            : 50,
			attribute_value_1 	: attr1,
			attribute_value_2 	: attr2,
			attribute_value_3 	: attr3,
			before_discount_price : $scope.product.product_variants[$scope.product.product_variants.length - 1].before_discount_price,
		}
		return variant;
	}
function makeVariant ( attr1 , attr2 , attr3 ) { let variant = { supplier_price : $scope . product . product_variants [ $scope . product . product_variants . length - 1 ] . supplier_price , markup : $scope . product . markup , retail_price : $scope . product . product_variants [ $scope . product . product_variants . length - 1 ] . retail_price , markup : ( ( $scope . product . product_variants [ $scope . product . product_variants . length - 1 ] . retail_price - $scope . product . product_variants [ $scope . product . product_variants . length - 1 ] . supplier_price ) * 100 ) / $scope . product . product_variants [ $scope . product . product_variants . length - 1 ] . supplier_price , sku : '' , supplier_code : $scope . product . supplier_code , custom_loyalty : $scope . product . custom_loyalty , quantity : $scope . product . quantity , quantity : 50 , attribute_value_1 : attr1 , attribute_value_2 : attr2 , attribute_value_3 : attr3 , before_discount_price : $scope . product . product_variants [ $scope . product . product_variants . length - 1 ] . before_discount_price , } return variant ; }
simply create and return new variant object
simply create and return new variant object
//// console.log(_sku); // var prefix_sku = $scope.product.prefix+'-'+_sku; //_sku++; //supplier_price 		: $scope.product.supplier_price, //sku 				: ( $scope.product.sku_number && !$scope.product.sku_custom ? _sku++ : $scope.getNamedSku() ),