<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Custom calculation capability needed</title>
		<link>https://legacy.forums.gravityhelp.com/topic/custom-calculation-capability-needed</link>
		<description>Gravity Support Forums Topic: Custom calculation capability needed</description>
		<language>en-US</language>
		<pubDate>Thu, 30 Apr 2026 19:28:45 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/custom-calculation-capability-needed" rel="self" type="application/rss+xml" />

		<item>
			<title>Shaun on "Custom calculation capability needed"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-calculation-capability-needed#post-330085</link>
			<pubDate>Tue, 18 Jun 2013 08:46:39 +0000</pubDate>
			<dc:creator>Shaun</dc:creator>
			<guid isPermaLink="false">330085@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I need someone to help with a calculation I need to make within a form. &#60;/p&#62;
&#60;p&#62;I have a product order form (on localhost at the moment so I can't post a url.) The customer can pay in advance (PayPal or cheque) or buy on 2 weeks credit. If they pay in advance they get 2 free products for every 10 they order. If they buy on credit they get 1 free product for every 10 they order.&#60;/p&#62;
&#60;p&#62;I need the form to calculate and display how many free products they're getting. For example:&#60;br /&#62;
Order 27 on credit = 27 + 2 free&#60;br /&#62;
Order 27 paid in advance = 27 + 4 free&#60;/p&#62;
&#60;p&#62;One of the challenges has been the only option for rounding is to round everything up. In this case everything needs to be rounded down in order for it to deliver the correct result.&#60;/p&#62;
&#60;p&#62;What I think could work best is to be able to remove the last digit from the integer and then multiply by either 2 or 1 - depending on whether paying in advance or on credit respectively. For example, if paying in advance (where they get 2 free products for every 10 ordered) if they ordered 42 products they would get 4 (42 with the 2 dropped) x 2 = 8 free products. Another example, if they order 49, with payment in advance, they would also get 8 free booklets (49 with the 9 dropped = 4 x 2 free products.) &#60;/p&#62;
&#60;p&#62;I also need the output to be available as a merge tag for inclusion in confirmations and notifications.&#60;/p&#62;
&#60;p&#62;You can contact me at +1.608.692.8802 or shaunkwilson at gmail dot com to let me know if you have any questions or suggestions.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
