Page 1 of 2

FXRate issue

PostPosted: Tue Jul 31, 2018 7:05 pm
by Riyaz
Hi There

Facing a weird problem, when we alter the FXRate column on the purchase order lines and then create a shipment for that purchase order, the shipment order lines comes up with a default FXRate all the time. Can you pls advise, thanks

Re: FXRate issue

PostPosted: Tue Jul 31, 2018 7:22 pm
by Mike.Sheen
Riyaz wrote:Hi There

Facing a weird problem, when we alter the FXRate column on the purchase order lines and then create a shipment for that purchase order, the shipment order lines comes up with a default FXRate all the time. Can you pls advise, thanks


Hi Riyaz,

What version of Jiwa are you using?

Mike

Re: FXRate issue

PostPosted: Tue Jul 31, 2018 7:25 pm
by Riyaz
Jiwa 7.1.0

Re: FXRate issue

PostPosted: Tue Jul 31, 2018 8:05 pm
by Mike.Sheen
Hi Riyaz,

It looks like this is by design.

We intentionally use the current FX rate when a PO is added to the shipment, as we expect it may have changed between placing the PO and raising the invoice - so we set the FX rate to the current rate. This especially makes sense when you add multiple PO's to the shipment for the same supplier at different FX Rates - we create on consolidated invoice automatically (although the user can manually add invoices and set the rates and link the invoices to lines if desired).

If you think this behaviour is incorrect, or would like a better explanation, then I suggest you create an issue on our helpdesk and our support team will be able to better assist.

Mike

Re: FXRate issue

PostPosted: Mon Aug 06, 2018 12:50 pm
by Riyaz
Hi Mike

Yes this is a problem because the value of the order changes when the purchase order is raised and when its being shipped.

Anyways, for the interim, am writing a plugin to fix this, but strange thing is that the value wont get, below is the code am using, the message box pop up with correct value but it wont get assigned.

public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic JiwaBusinessLogic, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
{
JiwaFinancials.Jiwa.JiwaLandedCost.Shipment.Shipment Shipment = (JiwaFinancials.Jiwa.JiwaLandedCost.Shipment.Shipment)JiwaBusinessLogic;
Shipment.Lines.Added += adding;
}

private void adding(JiwaFinancials.Jiwa.JiwaLandedCost.Shipment.Line line)
{MessageBox.Show(line.PurchaseOrderLine.CurrencyRateUsed.ToString());
line.FXRate = line.PurchaseOrderLine.CurrencyRateUsed;
}

Re: FXRate issue  Topic is solved

PostPosted: Tue Aug 07, 2018 10:20 am
by Mike.Sheen
Riyaz wrote:Yes this is a problem because the value of the order changes when the purchase order is raised and when its being shipped.


I'm not sure why that is a problem - there is no accounting impact until the goods are received or the invoice created - and for FX shipments the currency would normally change between the time of PO and goods receipt / invoice anyway.

When we receipt the goods we know the original PO FX Rate and reverse out the Expected Asset and Liability at the FX rate of the PO, and use the Invoice FX Rate on the shipment to work out the stock value.

Riyaz wrote:am writing a plugin to fix this, but strange thing is that the value wont get, below is the code am using, the message box pop up with correct value but it wont get assigned

We only recalculate things in the property setter of the FXRate of the Shipment Line under certain conditions - so setting that property won't work for you.

Set the FX Rate of the Shipment Invoice instead - this will automatically set the FX Rate of every shipment line associated with that invoice and will cause a recalculation.

Re: FXRate issue

PostPosted: Tue Aug 07, 2018 12:58 pm
by Riyaz
Set the FX Rate of the Shipment Invoice instead - this will automatically set the FX Rate of every shipment line associated with that invoice and will cause a recalculation.


Thanks Mike, can you pls show me an example on how to do this, as we can only access the PO FXRate once the PO is added to the shipment

Re: FXRate issue

PostPosted: Fri May 10, 2019 11:33 am
by Riyaz
Hi Mike

Pls advise on this, any example on how to set fx rate on shipment invoice to solve this, thanks

Re: FXRate issue

PostPosted: Mon May 13, 2019 11:25 am
by Riyaz
Hi Mike

Pls let me know on this, as this has become critical now, couple of our clients are waiting on this, as they cant also edit the FX rate manually.

Re: FXRate issue

PostPosted: Mon May 13, 2019 12:23 pm
by Scott.Pearce
When a purchase order is added to a shipment, it's lines are added as shipment lines. An invoice is also added for the supplier on the purchase order. If an invoice entry already exists for that supplier, an invoice entry is not created. The shipment lines for that supplier are associated with the invoice for that supplier. Additional invoices can be added, perhaps multiple invoices per supplier, and the lines can be manually associated to different invoices if desired.

Changing the FX fate on an invoice will change the FX rate for the associated shipment lines:

Capture.PNG


Changing the FX rate on a shipment invoice is allowed because it is likely that you will be charged a different FX rate than that which you entered when raising the purchase order because of normal FX currency fluctuations. When you use/enter an FX rate on a purchase order, you are really just "estimating" the FX rate so as to give the most accurate total possible. Of course, the likelihood of the FX rate being the same when the supplier actually generates the bill (invoice) to you is low.

The FX rate on a invoice can be changed pro-grammatically thus:

Code: Select all
    public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaBusinessLogic JiwaBusinessLogic, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
      JiwaFinancials.Jiwa.JiwaLandedCost.Shipment.Shipment Shipment = (JiwaFinancials.Jiwa.JiwaLandedCost.Shipment.Shipment)JiwaBusinessLogic;
      Shipment.Invoices.Added += Shipment_Invoices_Added;      
    }
   
   private void Shipment_Invoices_Added(JiwaFinancials.Jiwa.JiwaLandedCost.Shipment.Invoice Invoice)
   {
      Invoice.FXRate = 1;
   }


The code above will set the FX rate for added invoices (and hence shipment lines) to 1. Remember, invoices will be automatically added for each unique supplier as purchase orders are added to the shipment.