private void validateFixedAssetsInvoice_LRO(MInvoice invoice){
  if (invoice.get_ValueAsBoolean("IsFixedAssetInvoice")) {
    boolean hasFixedAssetLines=false;
    boolean hasNormalLines=false;
    for (    MInvoiceLine line : invoice.getLines()) {
      if (line.get_ValueAsBoolean("IsFixedAssetInvoice")) {
        hasFixedAssetLines=true;
      }
 else       if (line.getM_Product_ID() > 0) {
        MProduct product=MProduct.get(line.getCtx(),line.getM_Product_ID());
        if (product.isItem()) {
          hasNormalLines=true;
        }
      }
      if (hasFixedAssetLines && hasNormalLines) {
        throw new AssetInvoiceWithMixedLines_LRO();
      }
    }
  }
}

private void validateFixedAssetsInvoice_LRO ( MInvoice invoice ) { if ( invoice . get_ValueAsBoolean ( "IsFixedAssetInvoice" ) ) { boolean hasFixedAssetLines = false ; boolean hasNormalLines = false ; for ( MInvoiceLine line : invoice . getLines ( ) ) { if ( line . get_ValueAsBoolean ( "IsFixedAssetInvoice" ) ) { hasFixedAssetLines = true ; } else if ( line . getM_Product_ID ( ) > 0 ) { MProduct product = MProduct . get ( line . getCtx ( ) , line . getM_Product_ID ( ) ) ; if ( product . isItem ( ) ) { hasNormalLines = true ; } } if ( hasFixedAssetLines && hasNormalLines ) { throw new AssetInvoiceWithMixedLines_LRO ( ) ; } } } }
check if is a valid fixed asset related invoice ( lro )
