function checkClientSave() {
var itemCount = nlapiGetLineItemCount('item') // Get line Item count
if(itemCount>=1){
for (var i=1; i<=itemCount; i++ ) { //Loop through the lines
var quantityreceived = nlapiGetLineItemValue('item','quantityReceived',i); // Confirm the ID needed for "quantity" received
var quantitybilled = nlapiGetLineItemValue('item','quantityBilled',i); // Confirm the ID needed for "quantity" billed
var readyforffxinvoicing = nlapiGetLineItemValue('item','custcol_readyforffxinvoicing',i); // Confirm the ID needed for "quantity" billed
if((readyforffxinvoicing == T)&&((quantityreceived == quantitybilled))){
alert('The line marked "Ready for FFX Invoicing" has no corresponding Item Receipt. Line is not qualified for Invoicing');
return false;
}
else{
if(itemCount == i){
return true;
}
}
}
}
if (itemCount == 0){
alert('Please enter an item before saving');
return false;
}
}