- Timestamp:
- Oct 1, 2010, 6:04:29 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/InventoryReportService.groovy
r668 r669 199 199 'left join fetch inventoryItem.inventoryLocation as inventoryLocation', 200 200 'left join fetch inventoryLocation.inventoryStore as inventoryStore', 201 'left join fetch inventoryItem.unitOfMeasure as unitOfMeasure', 202 'left join fetch inventoryItem.picture as picture', 203 'left join fetch picture.images as Image' 201 'left join fetch inventoryItem.unitOfMeasure as unitOfMeasure' 204 202 where 'inventoryItem.isActive = true' 205 203 namedParams.siteId = result.site.id … … 226 224 break 227 225 } 228 result.inventoryItemTotalValue += inventoryItem.estimatedUnitPriceAmount * inventoryItem.unitsInStock 226 if(inventoryItem.estimatedUnitPriceAmount && inventoryItem.unitsInStock) // Some items have null estimatedUnitPriceAmount. 227 result.inventoryItemTotalValue += inventoryItem.estimatedUnitPriceAmount * inventoryItem.unitsInStock 229 228 } // for 230 229 -
trunk/web-app/reports/inventoryValue.jrxml
r668 r669 6 6 <property name="ireport.x" value="0"/> 7 7 <property name="ireport.y" value="144"/> 8 <import value="java.util.*"/> 8 9 <import value="net.sf.jasperreports.engine.*"/> 9 <import value="java.util.*"/>10 10 <import value="net.sf.jasperreports.engine.data.*"/> 11 11 <style name="Crosstab Data Text" isDefault="false" hAlign="Center"/> … … 70 70 <field name="unitsInStock" class="java.lang.Integer"/> 71 71 <field name="inventoryLocation" class="java.lang.Object"/> 72 <field name="picture" class="java.lang.Object"/>73 72 <field name="unitOfMeasure" class="java.lang.Object"/> 74 73 <field name="description" class="java.lang.String"/> … … 146 145 </textField> 147 146 </jr:columnHeader> 148 <jr:detailCell style="table_TD" height="51" rowSpan="1"> 149 <image hAlign="Center" vAlign="Middle"> 150 <reportElement x="29" y="0" width="88" height="51"/> 151 <imageExpression class="java.awt.Image"><![CDATA[net.sf.jasperreports.engine.util.JRImageLoader.loadImage($F{picture}.images.first().data)]]></imageExpression> 152 </image> 147 <jr:detailCell style="table_TD" height="24" rowSpan="1"> 148 <textField> 149 <reportElement x="0" y="2" width="117" height="20"/> 150 <textElement verticalAlignment="Middle"> 151 <font fontName="Serif"/> 152 </textElement> 153 <textFieldExpression class="java.lang.String"><![CDATA[$F{name}]]></textFieldExpression> 154 </textField> 153 155 </jr:detailCell> 154 156 </jr:column> … … 160 162 <font fontName="Serif" size="10" isBold="true"/> 161 163 </textElement> 162 <textFieldExpression class="java.lang.String"><![CDATA["Name/Description"]]></textFieldExpression> 163 </textField> 164 </jr:columnHeader> 165 <jr:detailCell style="table_TD" height="51" rowSpan="1"> 166 <textField isStretchWithOverflow="true"> 167 <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="237" height="25" isPrintWhenDetailOverflows="true"/> 168 <textElement verticalAlignment="Top"> 169 <font fontName="Serif" size="8"/> 170 </textElement> 171 <textFieldExpression class="java.lang.String"><![CDATA[$F{name}]]></textFieldExpression> 172 </textField> 173 <textField isStretchWithOverflow="true"> 174 <reportElement stretchType="RelativeToTallestObject" x="0" y="25" width="237" height="25" isPrintWhenDetailOverflows="true"/> 175 <textElement> 176 <font fontName="Serif" size="8"/> 164 <textFieldExpression class="java.lang.String"><![CDATA["Description"]]></textFieldExpression> 165 </textField> 166 </jr:columnHeader> 167 <jr:detailCell style="table_TD" height="24" rowSpan="1"> 168 <textField isStretchWithOverflow="true"> 169 <reportElement stretchType="RelativeToTallestObject" x="0" y="2" width="237" height="20" isPrintWhenDetailOverflows="true"/> 170 <textElement verticalAlignment="Middle"> 171 <font fontName="Serif"/> 177 172 </textElement> 178 173 <textFieldExpression class="java.lang.String"><![CDATA[$F{description}]]></textFieldExpression> … … 190 185 </staticText> 191 186 </jr:columnHeader> 192 <jr:detailCell style="table_TD" height=" 51" rowSpan="1">193 <textField >194 <reportElement stretchType="RelativeToTallestObject" x="0" y=" 0" width="90" height="51" isPrintWhenDetailOverflows="true"/>187 <jr:detailCell style="table_TD" height="24" rowSpan="1"> 188 <textField isStretchWithOverflow="true"> 189 <reportElement stretchType="RelativeToTallestObject" x="0" y="2" width="90" height="20" isPrintWhenDetailOverflows="true"/> 195 190 <textElement textAlignment="Center" verticalAlignment="Middle"> 196 191 <font fontName="Serif" size="8"/> … … 210 205 </textField> 211 206 </jr:columnHeader> 212 <jr:detailCell style="table_TD" height=" 51" rowSpan="1">207 <jr:detailCell style="table_TD" height="24" rowSpan="1"> 213 208 <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0"> 214 209 <leftPen lineWidth="0.0"/> … … 216 211 </box> 217 212 <textField isStretchWithOverflow="true"> 218 <reportElement stretchType="RelativeToTallestObject" x="0" y=" 0" width="104" height="51" isPrintWhenDetailOverflows="true"/>213 <reportElement stretchType="RelativeToTallestObject" x="0" y="2" width="104" height="20" isPrintWhenDetailOverflows="true"/> 219 214 <textElement textAlignment="Center" verticalAlignment="Middle"> 220 215 <font fontName="Serif" size="8"/> … … 234 229 </textField> 235 230 </jr:columnHeader> 236 <jr:detailCell style="table_TD" height=" 51" rowSpan="1">231 <jr:detailCell style="table_TD" height="24" rowSpan="1"> 237 232 <textField isStretchWithOverflow="true" pattern="# ##0.00"> 238 <reportElement stretchType="RelativeToTallestObject" x="0" y=" 0" width="90" height="51" isPrintWhenDetailOverflows="true"/>233 <reportElement stretchType="RelativeToTallestObject" x="0" y="2" width="90" height="20" isPrintWhenDetailOverflows="true"/> 239 234 <textElement textAlignment="Center" verticalAlignment="Middle"> 240 235 <font fontName="Serif" size="8"/> … … 254 249 </textField> 255 250 </jr:columnHeader> 256 <jr:detailCell style="table_TD" height=" 51" rowSpan="1">251 <jr:detailCell style="table_TD" height="24" rowSpan="1"> 257 252 <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0"> 258 253 <leftPen lineWidth="0.0"/> 259 254 <rightPen lineWidth="0.0"/> 260 255 </box> 261 <textField pattern="# ##0.00">262 <reportElement x="0" y="0" width="82" height="51"/>256 <textField isStretchWithOverflow="true" pattern="# ##0.00"> 257 <reportElement stretchType="RelativeToTallestObject" x="0" y="2" width="82" height="20" isPrintWhenDetailOverflows="true"/> 263 258 <textElement textAlignment="Center" verticalAlignment="Middle"> 264 259 <font fontName="Serif" size="8"/> … … 278 273 </textField> 279 274 </jr:columnHeader> 280 <jr:detailCell style="table_TD" height=" 51" rowSpan="1">281 <textField >282 <reportElement x="0" y="0" width="51" height="51"/>275 <jr:detailCell style="table_TD" height="24" rowSpan="1"> 276 <textField isStretchWithOverflow="true"> 277 <reportElement stretchType="RelativeToTallestObject" x="0" y="2" width="51" height="20" isPrintWhenDetailOverflows="true"/> 283 278 <textElement textAlignment="Center" verticalAlignment="Middle"> 284 279 <font fontName="Serif" size="8"/>
Note: See TracChangeset
for help on using the changeset viewer.