TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Variable Cost Calculation for Quotations

1 点作者 j0hann超过 2 年前
I hope you can help me on this one, since I was unable to find anything relatable on HN or elsewhere:<p>I am currently building a variable cost calculation function for cost quotations. Craftsman and Installer should be able to create a variable cost quotation for their service which works for different sizes of buildings. Such as the installation of a heat pump or air conditioning.<p>The calculation should look like this:<p>(variables are given by the system)<p>cost block A: variable_1 x 100<p>cost block B: if variable_2 = true +200<p>(add all to get the sum)<p>The current setup works as follows:<p>1. Create calculation in Form (DnD)<p>2. Convert to json-logic `https:&#x2F;&#x2F;github.com&#x2F;jwadhams&#x2F;json-logic-js`<p>3. Save to Database in json field<p>-- Display Product or Service --<p>4. Get json-logic from DB and apply for each cost block with variables<p>5. Return in API<p>6. Display for Customer in Front End<p>Am I missing something, is there a better way?

暂无评论

暂无评论