Madame Illa has just opened her second shop in Abomey-Calavi, and Prudence Kiki runs it. The company was created with default values, and some of them do not fit: the address is missing, the registration numbers are not filled in, and Illa wants any big manual discount at the till to wait for her approval. She also buys roofing sheets from a supplier who quotes in a currency that is missing from the list. The same steps apply to any company that needs its identity and its everyday rules adjusted after creation.

Complete the company profile

Prudence opens the company she works in with View my company. She fills in the address, the registration numbers, the opening hours and the logo with Update my company. She only sends what changes; everything else keeps its value. If the country or the fiscal status changes, Exowpee prepares the organization’s tax profile for the new pair when it does not exist yet. A company created with the unknown-country placeholder can move to its real country later: the tax configurations set up under the placeholder follow it, so products configured earlier are not sold untaxed. Creating the company itself is covered in Run the organization and its companies.

Adjust the settings

Illa opens the company settings with View company settings and changes them with Update company settings:
  • Time zone, for example Africa/Porto-Novo.
  • Rounding, a whole number of 0 or more.
  • Default tax value, a whole number from 0 to 100.
  • Manual discount approval threshold, for example 10 percent. The order needs approval when one manual discount goes above that percentage of the amount it applies to, or when all manual discounts together go above that percentage of the order’s amount before discounts and tax. Illa can clear it to remove the rule.
  • Whether a manual discount may be combined with a discount campaign.
The currency of the company’s orders and the monthly order limit are set when the company is created and are not edited here. Cashiers and agent accounts who only need to read the currency code, the number of decimals, the rounding and the time zone use View company settings, which needs no permission.

Add your own currency

Prudence checks whether that currency already exists. She sees what is available with List currencies and View a currency, then adds one with Add a currency, giving a code, a name and a number of decimal places. If she made a mistake, she corrects it with Update a currency. When it is no longer used, Delete a currency removes it.

The rules

  • Agent accounts are refused by the profile, settings and currency actions, except for the read-only settings action of the session, which accepts any actor type.
  • Permissions are companies.retrieve and companies.update for the profile, settings.retrieve and settings.update for the settings, and currencies.list, currencies.retrieve, currencies.create, currencies.update and currencies.delete for currencies.
  • Only the company you work in can be read or changed. A company has exactly one settings record.
  • A company name must stay unique among the companies of the organization, compared in lowercase. Fields that are not sent keep their stored value.
  • When only the country or only the fiscal status is sent, the other one is taken from the stored company and the pair must be valid together.
  • Working hours use the days monday to sunday and an exceptions map, with ranges written HH:MM-HH:MM where the start comes before the end. Once hours are set, a day left out counts as closed. Sending null removes the hours and the restriction.
  • The logo is a jpeg, png, jpg, gif or svg image of at most 2048 KB. Sending a new logo replaces the old file; sending null removes it.
  • Default tax value is an integer from 0 to 100. The manual discount threshold is a number from 0 to 100 with up to six decimals. Sending null for the threshold clears it; null for the campaign option is ignored.
  • Adding a currency needs a code, a name and a number of decimal places. Codes and names are stored in uppercase.
  • A company’s own currencies are unique by code and name. A company may add a currency with the same code and name as a shared one.
  • Only the company’s own currencies can be edited or deleted; shared currencies are refused. A deleted currency cannot be brought back.
  • The currency search compares the name in uppercase, so a lowercase search term does not match.

All the actions of this topic

  • View company settings: Shows the currency code, currency exponent, rounding and time zone of the company of the current session. Answers an empty JSON array ([]) when the company has no settings.
  • View my company: Shows the details of the company the member is currently working in.
  • Update my company: Edits the current company’s name, type, address, registration numbers, working hours, logo, country and fiscal status.
  • List currencies: Lists the currencies available to the company (shared ones and its own), searchable by name.
  • Add a currency: Adds a custom currency (code, name, decimal places) to the company.
  • View a currency: Shows one currency, either shared or belonging to the company.
  • Update a currency: Changes the code, name or decimal places of one of the company’s own currencies.
  • Delete a currency: Removes one of the company’s own currencies.
  • View company settings: Shows a company’s settings such as timezone, rounding, default tax and manual discount rules.
  • Update company settings: Changes a company’s timezone, currency rounding, default tax, and manual discount approval rules.