CO currency for settlement process in CJ88 - sap

We have an issue with settlement in SAP.
If we post 1000CAD in settlement rule (cj02) for an asset #123456 to a project then it get settled 1000USD after settlement run.
But my question is why the CAD allocation is settling as USD? How can we solve this issue?

All transactions (incl. settlements) in CO-PA are done in Controlling Area currency that couldn't be changed. It seems that your CA currency is USD.
Check if flag All currencies is set in tcode OKKP, node Activate component indicators
If this is the case then your company uses different currencies for documents which are:
controlling area currency
object currency (=company code currency)
transaction currency (specified for each transaction).
By default all settlements are reconciled in company code currency so check if it is USD and change to desired value.
By and large, currency determination in CO-PA is very complex, check SAP note 1320586 for more details.

Related

Odoo - Can't Change Default Currency Company

I want to change the company currency by opening Setting->Companies->Currency. But when I already change the currency and hit save button, I get this warning dialog
You cannot change the currency of the company since some journal items already exist
How to solve this problem?
You cannot change the currency of the company since some journal items already exist
Some data are already created with the same currency, if you do not need that entry then simply delete it and then change the currency.
reference code - Source Code
#forbid the change of currency_id if there are already some accounting entries existing
if 'currency_id' in values and values['currency_id'] != company.currency_id.id:
if self.env['account.move.line'].search([('company_id', '=', company.id)]):
raise UserError(_('You cannot change the currency of the company since some journal items already exist'))
The error occurs because there was journal entries exist. You have at least 2 options if you must change the company currency:
Delete all journal entries.
Update all currency ID in all journal entries with new currency id directly via PostgreSQL.
Once option 1 or 2 done, then try again to change the company currency.

Prestashop Tax Off When VAT Number Inserted

In my shop, when a user inserts a VAT number, the tax value desapears. I understand its comon practice abroad. But here in Portugal, the tax value is allways present.
I tried with Vat module and normal "NIF" field, but neither appears with tax value, or in the final invoice.
Im running, prestashop 1.6.0.8.
Someone with the same problem as me, another portuguese, says it got it workgin doing the folloying instrutions from a spanish tutorial:
In controllers/AuthController.php
Change
If ($country->need_identification_number && (!Tools::getValue(‘dni’) || !Validate::isDniLite(Tools::getValue(‘dni’))))
To
//if ($country->need_identification_number && (!Tools::getValue(‘dni’) || !Validate::isDniLite(Tools::getValue(‘dni’))))
if (!Validate::isDniLite(Tools::getValue(‘dni’)))
And in “controllers/”AddressController.php,
Change
if ($country->isNeedDni() && (!Tools::getValue(‘dni’) || !Validate::isDniLite(Tools::getValue(‘dni’))))
To
//if ($country->isNeedDni() && (!Tools::getValue(‘dni’) || !Validate::isDniLite(Tools::getValue(‘dni’))))
if (!Validate::isDniLite(Tools::getValue(‘dni’)))
But this code is for 1.5.x presta and mine is 1.6.0.8 and i guess dni is ther tax name.
Heres the source: http://postly.elnostreraco.com/como-hacer-el-dni-opcional-en-prestashop-y-por-que-desconfiar-si-te-hacen-tocar-codigo-base/
When using the VAT Module you can select a country. For users from that country (the one you selected in the module config), VAT will be added. For users from other countries, VAT will not be calculated, which, i believe, is in accordance with EU Law.
From here:
Your PrestaShop is misconfigured. When no "Your country" set in module "vatnumber" and your customer fill in the vat_number field, presta shop will force tax-free price.
I've selected country in this module (but not vat number validation) and it worked - user enter vat code or not, VAT is applied.

Tax Calculate Incorrectly - WooCommerce

All
I am running the WordPress 3.4.1 with the WooCommerce 1.5.8, as of this writing.
i just more confuse in Tax Amount
I need help with a Woocommerce problem.
Woocommerce has a "taxable" status for shipping. This option should include tax calculation on shipping (which has to be shown by law in the Netherlands).
However I have selected this option, however the system only calculations tax on the items products, NOT on the shipping costs.
So the tax calculation should be: 21% of (product price + shipping costs) while now it is 21% of product price.
So the problem is, the tax amount now is 21% of the product: 99.95 - (99.95/1.21) = 17.35.
In the shipping settings in woocommerce you can set your shipping to be added to tax calculation (tax status: taxable).
If this option is selected, the tax calculation should actually be:
product costs + shipping costs / ((product costs + shipping costs)/1.21).
So the total of products + shipping = 105.90.
Which means the tax calculation should be 105.90 - (105.90/1.21) = 18.38
Right now
it calculates 99.95 - (99.95/1.21) =17.35
I would like it to calculate 105.90 -(105.90/1.22) = 18.38.
Anyone Help Please ???
After too many research I got solution and its so simple...
Follow below steps..
1)Go to woocommerce > settings.
2)Under Tax tab,there are Tax Options and Tax rates links available.Under Tax options,select shipping tax class..!
3)In Tax rates,click on your previously selected tax class and just checked checkbox under shipping column..
So, Now your tax calculation is: 21% of (Cart Subtotal + shipping costs)..
For detail with screenshots please visit : http://maishidh.blogspot.in/
I was looking though the docs and it seems to me you might need some hard coding done. Here are the API documentation in regards of Woo commerce Tax Api. Look at line 503 and line 508. Maybe change those variables and see what you might get.
http://docs.woothemes.com/wc-apidocs/source-class-WC_Tax.html#_calc_shipping_tax

How do I get the correct taxes for a Shopify order from the API

I am receiving an order from the Shopify web-hook orders/create and
need to store the price and tax applicable for that order. I see some
settings in the Shopify preferences that allow me to set a sales tax
per delivery destination. Also Shopify allows me to optionally charge
taxes for shipping. I see the "taxes_included" property on the order
(which I take to mean that the price listed is either net or gross).
But it doesn't seem to specify if the shipping includes taxes. Is
there a way I can get this information from the API?
Here is the data that I'm passed in the web-hook call. I can do
further API calls to get the information if it is available, but can't
find it all in the documentation.
I have found the countries API, documented here:
http://api.shopify.com/country.html
So I should be able to look up the correct tax percent for the
line_items from the billing address province_code & country_code.
But I can't find anything telling me what tax should or shouldn't be
charged on shipping lines.
It would be more convenient if the tax was actually provided in the
data. It should also be more correct, since there is a chance (however
small) that the tax rates are changed in between me getting the
callback and making further requests for tax info. Is there a way to
get Shopify to provide that information in the web-hook?
Also, I have so far failed to get an data in the tax_lines property in
the data. Is there any hoop I need to jump through to get this?
An example of the data provided in the callback:
{"note":"",
"total_discounts":"0.00",
"cancel_reason":null,
"shipping_lines":
[{"code":"International Shipping",
"price":"25.00",
"source":"shopify",
"title":"International Shipping"}],
"landing_site_ref":null,
"discount_codes":[],
"currency":"CAD",
"buyer_accepts_marketing":true,
"customer":
{"last_order_name":null,
"note":null,
"last_name":"Test",
"state":"disabled",
"updated_at":"2012-11-20T08:05:07-05:00",
"last_order_id":null,
"orders_count":0,
"total_spent":"0.00",
"created_at":"2012-11-05T10:50:23-05:00",
"email":"test#example.com",
"first_name":"Test",
"accepts_marketing":true,
"id":101986160,
"tags":""},
"token":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"note_attributes":[],
"gateway":"bogus",
"cancelled_at":null,
"name":"#1025",
"processing_method":"direct",
"updated_at":"2012-11-20T08:05:07-05:00",
"payment_details":
{"avs_result_code":null,
"credit_card_bin":"1",
"cvv_result_code":null,
"credit_card_number":"XXXX-XXXX-XXXX-1",
"credit_card_company":"Bogus"},
"total_price":"44.00",
"shipping_address":
{"country":"United States",
"last_name":"Test",
"longitude":"-88.1632",
"name":"Test Test",
"address1":"Test",
"province":"Alabama",
"address2":"",
"latitude":"30.3891",
"city":"Test",
"phone":"",
"province_code":"AL",
"first_name":"Test",
"country_code":"US",
"zip":"36523",
"company":"Test"},
"line_items":
[{"variant_id":240781369,
"quantity":1,
"name":"product with stock code and shopify stock value",
"properties":[],
"title":"product with stock code and shopify stock value",
"product_id":104741307,
"variant_inventory_management":"shopify",
"fulfillment_service":"manual",
"sku":"some-stock-code",
"variant_title":null,
"requires_shipping":true,
"price":"19.00",
"vendor":"Shopify",
"id":243081982,
"grams":0,
"fulfillment_status":null}],
"closed_at":null,
"billing_address":
{"country":"United States",
"last_name":"Test",
"longitude":"-88.1632",
"name":"Test Test",
"address1":"Test",
"province":"Alabama",
"address2":"",
"latitude":"30.3891",
"city":"Test",
"phone":"",
"province_code":"AL",
"first_name":"Test",
"country_code":"US",
"zip":"36523",
"company":"Test"},
"order_number":1025,
"total_line_items_price":"19.00",
"total_tax":"0.00",
"tax_lines":[],
"created_at":"2012-11-20T08:05:07-05:00",
"landing_site":"\/",
"fulfillments":[],
"total_price_usd":"44.14",
"financial_status":"authorized",
"email":"test#example.com",
"browser_ip":"1.2.3.4",
"total_weight":0,
"referring_site":"",
"client_details":
{"accept_language":"en-US,en;q=0.8",
"browser_ip":"1.2.3.4",
"session_hash":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"user_agent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.1 (KHTML, like Gecko) Chrome\/21.0.1180.89 Safari\/537.1"},
"subtotal_price":"19.00",
"number":25,
"taxes_included":false,
"id":148179898,
"cart_token":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"fulfillment_status":null}
Assuming tax is charged on an order, all tax will appear in the tax lines array. You might have better luck using a real address in your tests. Try a famous US landmark or something.
If the shop is set up to charge tax on shipping, the amount will be included in the tax lines for the order. You can find out if the shop charges tax on shipping by looking at the Shop object.

In OpenERP, how can I determine how stock from purchases are assigned to which manufacturing orders?

Summary
In a scenario where I'm about to receive a shipment of raw materials that isn't large enough to fill all my outgoing shipments and production orders, how can I predict which outgoing shipments and production orders those raw materials will be assigned to?
Details
I have a new test database upon which I did the following:
Setup
Create a product to produce, make_to_stock, (say, 'Cabinet')
Create a product to buy, make_to_stock, (say, 'Wood')
Add a BOM to the Cabinet product containing a single BOM line, one 'Wood'
Add a supplier to the Cabinet
Add an orderpoint to keep the VA of Wood at zero (that is, never keep stock)
Process
Create a procurement request for Cabinet
Run procurement
The procurement created an MO for cabinet, found the BOM, and created a few move lines for the Cabinet and Wood, and created a procurement for each product
Confirm procurement from MO for Wood, and watch it go into exception.
At this time, there are four stock moves in the system:
1. Cabinet Stock->Stock, from initial procurement, in state 'confirmed' (waiting on #2)
2. Cabinet Production->Stock, from MO, in state 'waiting' (waiting on #3)
3. Wood Stock->Production, to be consumed by MO, in state 'waiting' (waiting on #4)
4. Wood Stock->Stock, procurement reservation from MO input, in state 'exception' (no stock found)
Now, to continue:
Run scheduler. This creates a new procurement for Wood, because the VA < 0, based on the orderpoint we defined. It also confirms and runs that procurement, which creates a new purchase order for Wood and sets up draft stock moves.
Confirm that PO, which will assign the stock moves.
It is at this point that we'd be waiting for the Wood to be delivered. Go to receive products, and confirm the stock move.
At this point, the four stock moves are in the same state, and there are two additional ones for Wood, one from Suppliers->Stock, and one from Stock->Stock. In the last step, we confirmed the move into Stock->Stock.
Currently we have 1 Wood in stock, and 1 Wood procurement in exception due to not enough stock.
My question is, how can I determine where this wood will be assigned in the future? If that is not possible (seems like it might not be), then after retrying the procurement and seeing it succeed, how can I tell where the stock move was initially assigned from?
To be clear as to why this is needed, we will have a delivery of several products, and we'd like to physically place them either in stock or directly in front of a machine that is going to need it. That is, we'd like to be able to trace the delivery stock moves directly though to it's assigned slot in a MO.
For additional referance, here's what the stock moves look like after that Wood procurement is retried:
#Initial Procurement
37787: 1.0 Base Cabinet (copy) [Stock -> Stock] (confirmed waiting for 37788) (procured from 16580)
#MO final product
37788: 1.0 Base Cabinet (copy) [Production -> Stock] (waiting waiting for 37789) (finished product of MO 7433)
#MO source product (has move history with 37790)
37789: 1.0 1/2ChinFPly1s (copy) [Stock -> Production] (assigned waiting for 37790) (to be consumed by 7433)
#Procurement for input, waiting for something in stock
37790: 1.0 1/2ChinFPly1s (copy) [Stock -> Stock] (done) (procured from 16581)
#------------------------------
#------------------------------
#Procurment from Orderpoint, putting something in stock (has move history with 37794)
37791: 1.0 1/2ChinFPly1s (copy) [Stock -> Stock] (done waiting for 37794) (procured from 16582)
37794: 1.0 1/2ChinFPly1s (copy) [Suppliers -> Stock] (done) (final move of PO line 3)
There does not seem to be any way to connect the first four moves with the last two.
in core openerp there is no feature that can tell you about the stock from which order are assigned to what order. you have to implement or search on internet for the fifo lifo module that can help you . for ref : http://www.youtube.com/watch?v=DfoxZLxagXQ
It looks like the procurements that come earlier in the schedule will get first choice of any shipments you just received. You can override that by manually rerunning procurements before the MRP scheduler runs or by adjusting the date_planned field of procurements.
The next time the MRP scheduler runs after your shipment is received, it will go through all procurements that are in the exception state and try to restart them. In the scheduler code, you can see that it processes them ordered by date_planned.
if not ids:
ids = procurement_obj.search(cr,
uid,
[('state', '=', 'exception')],
order="date_planned")
for id in ids:
wf_service.trg_validate(uid, 'procurement.order', id, 'button_restart', cr)