Understanding Cost of Goods Sold (COGS) in Ratals ERP

Rob Cuppett Author: Rob Cuppett

Cost of Goods Sold (COGS) is one of the most important metrics in any accounting or inventory management system. It determines how much your sold products cost your business, directly impacting profit margins and financial reporting accuracy. In Ratals ERP, COGS is handled with precision by tying each sale directly to the actual inventory cost stored in the system.

Ratals ERP gives you full control over how COGS is applied, allowing you to choose between FIFO (First In, First Out), LIFO (Last In, First Out), or Average Cost Inventory. This flexibility ensures that your cost calculations align with your preferred accounting strategy.

In this tutorial, I'll cover:

Why COGS Matters

Before diving into how Ratals handles COGS, it's important to understand why it matters so much. Your COGS figure directly affects your gross profit - the difference between your revenue and the actual cost of goods sold. If your COGS isn't calculated accurately, your profit margins, pricing strategy, and even tax reporting can all be off.

In a fast-moving business environment, especially for companies with frequent stock movement, the method you choose for calculating COGS (FIFO, LIFO, or Average Cost) can change your reported profit significantly. Ratals ERP ensures that every sale is matched with the correct inventory cost, maintaining accuracy across all financial reports.

Applying COGS When an Order is Placed

When an order is placed in Ratals ERP, the system immediately determines which inventory should be depleted and what cost should be applied. The COGS setting you choose dictates this process.

For example, if your company uses the FIFO (First In, First Out) method, Ratals will pull from the oldest inventory assets first. If you prefer LIFO (Last In, First Out), the most recently added inventory is depleted first. If you use Average Cost Inventory, the cost applied to the sale is based on the weighted average cost of all available inventory units.

This ensures that the cost assigned to each sale reflects your chosen accounting method - maintaining consistency between your inventory levels, income statement, and balance sheet.

Costing Methods: FIFO, LIFO, and Average Cost

FIFO (First In, First Out)

FIFO assumes that the oldest inventory purchased or produced is sold first. This is the default method in Ratals ERP. Under FIFO, inventory costs flow in the same order as goods are received, which often aligns closely with physical stock movement.

When a sale is made, Ratals retrieves the oldest available inventory rows from the inventory_assets table and uses their cost for the COGS entry. This approach is simple, transparent, and preferred in many industries, especially those where goods are perishable or time-sensitive.

LIFO (Last In, First Out)

LIFO assumes that the newest inventory is sold first. In this method, Ratals pulls from the most recent entries in the inventory_assets table when calculating COGS.

This can be advantageous during times of rising prices, as it results in higher COGS and lower taxable income. However, it can also leave older inventory costs on the books longer. Ratals ERP fully supports this option for businesses that prefer a more tax-efficient inventory approach.

Average Cost Inventory

The Average Cost method calculates the mean cost of all inventory available for sale. When a sale is made, Ratals applies a single average cost value across all units sold during that period.

This method smooths out cost fluctuations and provides a balanced view of profit margins over time. Ratals continuously updates the average cost as new inventory is received, ensuring accurate ongoing COGS calculations.

To select your preferred COGS Method in Ratals, navigate to the admin area and make your choice based on your accounting strategy.

Path: Admin > Accounting > Settings > All Settings

Example Screenshot:

Ratals Admin showing where to select FIFO, LIFO, or Average Cost for COGS Method

Note: Changing the "Cost of Goods Sold (COGS) Method" determines how inventory is selected for depletion on future sales or orders. Costs for past orders or sales will not be affected.

How Ratals Selects Inventory Assets

Every item sold in Ratals ERP is tied directly to an entry in the inventory_assets table. This table stores all the key details of each inventory batch that is posted, including quantity available, total landed cost, and the date it was created.

When an order is processed, Ratals uses your selected COGS method to determine which inventory record to deplete. For example:

  • FIFO: Orders inventory by created_date ASC (oldest first).
  • LIFO: Orders inventory by created_date DESC (newest first).
  • Average Cost: Calculates the weighted cost across all available rows.

Once the correct inventory is identified, Ratals reduces the quantity available in that record and assigns its cost to the sale transaction. The cost value is not recalculated - it's pulled directly from the inventory_assets record, ensuring accuracy and consistency.

Real-World Example: How COGS Works in Practice

Let's say your company sells a product called “Widget A.” Over time, you've purchased this item in multiple batches, each at a different cost:

  • Batch 1: 100 units at $10 each (oldest)
  • Batch 2: 200 units at $12 each
  • Batch 3: 150 units at $15 each (newest)

If your COGS setting is FIFO and you sell 120 units, Ratals will pull the cost from Batch 1 first (100 units at $10), then from Batch 2 for the remaining 20 units (20 units at $12).

If you were using LIFO, Ratals would instead pull from Batch 3 first, using the most recent cost. And if you use Average Cost, Ratals calculates a blended cost from all three batches - ensuring every sale reflects the overall weighted cost.

How COGS Influences Financial Reporting

Because COGS is a direct expense, it plays a critical role in financial statements. Each sale automatically generates the correct journal entries in Ratals ERP, reducing inventory assets and recording COGS on the income statement.

This automation ensures that financial reports - such as the Income Statement and Balance Sheet - always reflect the most accurate costs. Whether you use FIFO, LIFO, or Average Cost, your gross profit and inventory valuation stay aligned with your chosen method.

Best Practices for Using COGS in Ratals

To get the most accurate results from Ratals ERP, make sure your inventory posting process is consistent and up to date. Always confirm that each new purchase or received batch is correctly recorded in inventory_assets with its true cost.

Once a cost is assigned to inventory upon posting, that cost remains fixed for that specific batch or posting. This is important for maintaining accuracy across financial records and ensuring that posted costs match related bills and vendor invoices.

If you ever change your COGS method (for example, from FIFO to LIFO), remember that it affects how new sales are calculated - not past transactions. Historical records remain based on the method used at the time of posting.

By handling COGS directly from the inventory_assets table, Ratals ERP ensures precise, auditable, and compliant financial data - every time a sale is made.

Frequently Asked Questions

What is COGS in Ratals ERP?

COGS (Cost of Goods Sold) represents the direct cost of products sold by your business. In Ratals ERP, it is calculated by linking each sale to the actual inventory cost stored in the system, ensuring accurate profit reporting.

Which COGS methods are supported?

Ratals ERP supports FIFO (First In, First Out), LIFO (Last In, First Out), and Average Cost. Each method determines how inventory is selected and valued when sold.

Can I change the COGS method after posting inventory?

Yes, you can change your COGS method in the admin settings, but it will only affect future sales. Past sales and orders retain the COGS method applied at the time of posting.

How does Ratals select inventory for depletion?

Ratals uses the selected COGS method to determine which inventory batch to deplete. FIFO pulls the oldest inventory first, LIFO pulls the newest, and Average Cost calculates a weighted average across available batches.

Where can I update the COGS method in Ratals ERP?

You can update it in the admin area: Admin > Accounting > Settings > All Settings.

Does changing COGS affect financial reporting?

Yes, COGS affects gross profit and journal entries automatically generated in Ratals ERP. However, only future transactions are affected by any COGS method change; past records remain unchanged.

Rob Cuppett
About the Author
Rob Cuppett is the founder and lead engineer behind Ratals, bringing over 20 years of experience in digital marketing, software development, and business automation. He shares expert tutorials, practical guides, and insights to help business owners optimize, customize, and fully leverage software solutions to grow their businesses efficiently.
0 Comments
Post a New Comment
This site uses cookies to deliver its services and to analyze traffic. Learn more on our Cookie Policy and Privacy Policy.