# Price Dependency

<p class="doc-lead">Price Dependency defines formulas that derive one item's selling price from another item's price. Rules are applied on the <a href="#/sales/date-wise-pricing">Date Wise Pricing</a> screen using <b>Calculate Dependencies</b> — they do not resolve prices directly on sale bill entry.</p>

<div class="doc-toc">
<p class="doc-toc-title">On this page</p>
<div class="doc-toc-section">
<div class="doc-toc-links">
<a href="#/sales/price-dependency?id=overview">Overview</a>
<a href="#/sales/price-dependency?id=fields">Fields</a>
<a href="#/sales/price-dependency?id=how-it-works">How It Works</a>
<a href="#/sales/price-dependency?id=actions">Actions</a>
<a href="#/sales/price-dependency?id=faq">FAQ</a>
<a href="#/sales/price-dependency?id=related">Related</a>
</div>
</div>
</div>

<hr class="doc-section-divider">

<h2 id="overview">Overview &amp; List View</h2>

Go to <b>Sales → Settings → Price Dependency</b> from the left menu.

Create rules when the price of one item should automatically follow another item's price — for example, a finished good priced as raw material plus a markup.

<b>List columns</b>

| **Column** | **Description** |
|------------|-----------------|
| Id | Rule record ID. |
| Item | Item whose price will be calculated. |
| Source Item | Item whose price is used as input (<code>x</code> in the formula). |
| Formula | Expression evaluated against the source item price. |

<b>List row actions</b>

| **Action** | **Description** |
|------------|-----------------|
| View | Opens read-only rule details. |
| Edit | Opens the edit form. |
| Delete | Removes the rule. |
| Suspend / Activate | Disables or re-enables the rule. |

<b>Price Dependency</b>

<img src="sales/images/datewiseprice.webp" alt="Price Dependency list" loading="lazy">

<hr class="doc-section-divider">

<h2 id="fields">Fields</h2>

| **Field** | **Description** |
|-----------|-----------------|
| Item * | The item whose price will be calculated. |
| Source Item * | The item whose current price (<code>x</code> in the formula) is used as input. |
| Formula * | Expression evaluated against the source item price. Use <code>x</code> for the source price. Example: <code>x+10</code>, <code>x*1.05</code>. |
| Round to | Optional rounding after formula evaluation: nearest 10, floor to 10, ceiling to 10, nearest 1, floor to 1, ceiling to 1. |

<hr class="doc-section-divider">

<h2 id="how-it-works">How It Works</h2>

<ol>
<li>Define dependency rules on this screen — one rule per target item.</li>
<li>On <a href="#/sales/date-wise-pricing">Date Wise Pricing</a>, set or load prices for source items on the selected date.</li>
<li>Click <b>Calculate Dependencies</b>. For each rule, the system reads the source item's price in the grid, evaluates the formula, applies rounding, and writes the result to the target item's price.</li>
<li>Click <b>Update Price</b> on Date Wise Pricing to save the computed prices.</li>
</ol>

<p>On sale bill entry, prices from Date Wise Pricing (including dependency-calculated values) apply in the resolution chain after previous customer price and pricing rules. See <a href="#/sales/sale-settings-config?id=price">Sale Settings → Price</a>.</p>

<p><b>Connected reports:</b> Saved sale transactions reflect the final rates. Review in <a href="#/sales/reports/sale-report">Sale Report</a> and <a href="#/sales/reports/item-wise-sale-report">Item Wise Sale Report</a>.</p>

<hr class="doc-section-divider">

<h2 id="actions">Actions</h2>

<b>List header:</b> <b>New</b>

| **Action** | **Description** |
|------------|-----------------|
| Edit | Opens the price dependency form |
| Delete | Removes the rule |

<b>Form buttons:</b> <b>Save</b> / <b>Update</b>, <b>Reset</b>, <b>Cancel</b>

<hr class="doc-section-divider">

<h2 id="faq">FAQ</h2>

<b>Is Price Dependency the same as Date Wise Pricing?</b><br>
No. Date Wise Pricing stores prices by date. Price Dependency only defines how one item's price is calculated from another — the calculation runs on the Date Wise Pricing screen.

<b>What variable can I use in the formula?</b><br>
Use <code>x</code> for the source item's current price in the Date Wise Pricing grid.

<b>What happens if the source item has no price?</b><br>
The formula cannot compute a valid result for that dependency until the source item price is set.

<b>Where is the formula evaluated?</b><br>
On the <a href="#/sales/date-wise-pricing">Date Wise Pricing</a> screen when you save or refresh prices for the effective date — not on the sale bill directly.

<b>Can one source item drive many dependent items?</b><br>
Yes. Define multiple dependency rows pointing to the same source SKU with different formulas (e.g. pack sizes).

<b>Do I still need basic pricing for dependent items?</b><br>
Dependent items typically rely on the computed date-wise price. Keep basic pricing as fallback if the formula cannot run.

<b>What happens when the source price changes?</b><br>
Re-save or recalculate date-wise pricing for the affected date so dependent item prices update before new sales are entered.

<hr class="doc-section-divider">

<h2 id="related">Related Topics</h2>

<ul>
<li><a href="#/sales/date-wise-pricing">Date Wise Pricing</a></li>
<li><a href="#/sales/basic-pricing">Basic Pricing</a></li>
<li><a href="#/sales/sale-settings-config">Sale Settings</a></li>
<li><a href="#/sales/sale-settings">Sale Settings hub</a></li>
</ul>
