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:
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.