perp-trunk + EGW CE 1.8 : Shipment received OK, Invoice not correctly generated

classic Classic list List threaded Threaded
1 message Options
el_es el_es
Reply | Threaded
Open this post in threaded view
|

perp-trunk + EGW CE 1.8 : Shipment received OK, Invoice not correctly generated

Hi Developers, Nathan,

I have 'received' my first shipment.
First thing, the receive screen demands exact counts of components received
(and that is I think related to what I'm seeing):

In the invoice creation area, the quantity is not divided by unit of measure when
pre-filled,
so what should be
quantity : 2 ; Description : Resistor pack of 100; Unit price : 0.011; Line price 1.23

(as per delivery note)
comes up as
quantity: 200; description: [same]; Unit price : 0.011; Line price : 2200.0 (!)

Modifiying the quantity to 2 produces
quantity: 2; description: [same]; Unit price : 0.011; Line price : 22.0 (!)

Suppliers catalogue lists this product sold by this supplier in packs of 100, at 0.61 per pack.

This results in an invoice of £176 being inflated to unrealistic numbers
(and modifying the quantities on the edit screen, doesn't help at all, it gets worse)

Looking for the files containing 'line_price' text produces interesting results:
----
perp_ap/inc/class.bo_perp_incoming_shipment.inc.php:172 :

'line_price' => $invoice_line->get_unit_price() * $invoice_line->get_quantity();
----
perp_ap/inc/class.PayableInvoiceLine.inc.php:22 :

public function get_line_price() {
  return bcmul($this->unit_price, $this->quantity, 2);
}
----
So basically, it takes $this->quantity directly as I thought. How can I get the suppliers units-of-sale to divide quantity by ?
Will browse around that,
----
There is also something along the same lines in perp_ap/inc/report/class.purchase_order.inc.php (lines 152, 182)

I am guessing the ajax scripts may also need amendments but I don't know where.

Hope this helps,
Lukasz


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers