How to add first year and next year price cycle like that,
First year my package price : £199, but next year would be £99.
How to set like that package in pricing on WHMCS
You can add £100 as setup fee and £99 as the price for your package. So, the first invoice will be generated of £199 and from the next invoice, it will be £99.
Check the Pricing Tab from http://docs.whmcs.com/Products_and_Services#Products
On Product/Services (Client Profile) there is First Payment Amount and Recurring Amount
Put £199 at First Payment Amount and £99 at Recurring Amount and Save Changes
Related
I'm trying to solve this task. But I can't understand how to add 3 months condition right. Please help
Partners receive bonuses for every client that they introduce to the company. Assume that the company has 3 active partners.
Partner paid on a monthly based - for every introduced client partner gets 0.5% of the amount deposited by the client excluding withdrawals. But, with the condition that if the client withdraws the amount more than 3 months after the amount was deposited – such withdrawals are not included in the partner’s bonus reduction.
For example, in August partner’s client deposited $1000 and withdraw $100. Partner gets (1000-100)*0.5%=$4.5. But in case the $100 withdrawal is from the deposit made by the client in April, in this case, the partner’s bonus is (1000)*0.5%=$5
Task: write a SQL script that calculates the monthly bonus amount for each partner.
Data is in the link [1]: https://docs.google.com/spreadsheets/d/17xo_gnu9nEwXuCNb8vBLEVrhPEKJaIRN/edit?usp=sharing&ouid=112201519964034772995&rtpof=true&sd=true
Between worls only when the date left of the AND is lower tha the right.
So your code mus look like
select
*
from
transactions
where date=any (select
date
from
transactions
where type='withdrawal'
and date between (date - interval '3 month') AND date)
and type='deposit'
order by 1,3,7
We have set up GST application where I am getting difference between reports like monthly item wise sales report against monthly total sales report.
Please suggest me any changes I need to make for following rules:
We have 3 tables
A. Order master - single line for every order is stored with summarized values
B. Order product details - Each line item stored with respective qty, price etc.
C. Order tax details - line item wise tax details having separate row for CGST, SGST etc.
Here is how I am storing the data:
Tax is applicable on every line item [To generate final invoice all items in order group, we create some of all line items and storing value in Order Master.]
We are rounding 2 decimal value for 3 precision [eg. 4.657 = 4.66, 4.643 = 4.64] as per GST council
Rounding value is stored in Order Master table
For discount there are 2 cases
Percent based discount - Let's say if discount is 10% then from every individual line item 10% discount gets deducted than tax will be applicable for each line item
Flat discount - Let's say for 1000/- Rs order somebody wants to give 80/- Rs. discount than from each line item 8% is deducted and than tax will be applied, off course customer may not pay exact 920/- Rs. amount due to reversal of tax amount.
Now when I am generating following reports:
Monthly item wise sales report [Product wise sales report]
Monthly total sales report [Total sales]
Monthly payment type wise report [Bank, Cheque, Cash]
I am getting difference due to rounding of values. Can anyone suggest me which is the best way to set up rounding formula and up to which decimal point should I go to round the values.
I am using SQL server as backend and .net as front end technology.
I'm struggling with a database schema for a problem I'm having.
Let's say I own a business that sells monthly services (cleaning) to different companies.
However, I give companies monthly saveable 'coupons' that act like a reduction (of 5 dollars) based on their amount of users.
Example:
It's april 2018
Company XYZ has to pay 1.000 dollars for their monthly cleaning services by my business.
XYZ, has 5 employees, so they will have 5 coupons for the month of april.
HOWEVER, since coupons can be saved (for a period of 2 months), company XYZ will not use the coupons of only april, but also of march (since they didn't use any that month and february coupons are already used up).
Result:
10 coupons are used on their april invoice (5 of march, 5 of april):
total amount to pay 950 dollars
My thing is that I want to automate this. With one click on the button, my system will have to check:
How many users there are
If there are any unused coupons from last 2 months (and use those first if they exist)
Apply coupons to their invoice.
I want to design this first in a database but i'm struggling:
This is my design
Company
CompanyID
Name
User
UserID
CompanyID
UserID
Now I'm struggling with the coupon design, how can I develop this so that I can automise my problem.
I will need to save coupons per company per month.
My idea is to do it like this:
Company_Month_Coupon
CompanyID
Coupon_Count
Month
I wasn't sure if i could do this in one table and i'm not so sure with the following problem:
what if my program user decides to cancel an invoice, how would my system know from which month the coupons came?
What design would be adviced in a coupon-sharing system?
Any advice to tackling this problem would greatly appreciated.
I would go with your idea and have 2 more tables: Invoices and Invoices_UsedCoupons
Invoices:
ID (Primary key)
CompanyID
Month
Status (to set a cancelled status on your invoice if you don't want to delete from the DB)
Invoices_UsedCoupons:
InvoiceId (foreign key to Invoices table)
Coupon_Count
Month (this field is for the used coupons from Company_Month_Coupon table)
The reasons for this:
We should still store the issued coupons (in your Company_Month_Coupon table) because for each month, the number of employees may change. It means that you have to keep track of the issued coupons whenever the number of employees changes.
With Invoices and Invoices_UsedCoupons table, you could easily calculate the actual used coupons & the remaining coupons.
what if my program user decides to cancel an invoice, how would my
system know from which month the coupons came?
All the information is available in Invoices and Invoices_UsedCoupons tables. If you want to reclaim coupons after cancelling the invoice, it's also easy to do.
"I will need to save coupons per company per month."
Maybe you can do the opposite. In the database does not store coupons that can be used, but only those that are actually used, for example in the table "used_coupons"
The idea is that the coupons are given up by default, so it makes no sense to store them. Only need to save the used coupons.
At checkout you need to find out how much users is in the company and how many "used coupons" is saved in the last two months.
If X coupons are returned then from the "used_coupons" table you need to delete the latest X coupons.
I'm using MS Access 2010 and am writing a program to display the lease amount to be paid over a period of 36 months. Once I have entered the contract into a table I use the following expression:
Charge: IIf(Date()>[1StartDate] And (Date())<=[2StartDate],[1Sched],
IIf(Date()>[2StartDate] And (Date())<=[3StartDate],[2Sched],
IIf(Date()>[3StartDate] And (Date())<=[4StartDate],[3Sched],
IIf(Date()>[4StartDate] And (Date())<=[5StartDate],[4Sched],
IIf(Date()>[5StartDate] And (Date())<=[EndDate],[5Sched],"0")))))
This shows the correct Rental amount to be invoiced but I would like to display the entire 36 months schedule so that when I run batch invoicing one specific month at a time will be ticket off as having been processed. How may I accomplish this?
I'm quite new to access and I am currently in the process of making a database for my company.
I have a 'Jobs' table with these fields in:
Job No.
Year Initiated
Month Initiated
Company ID
Job Description
Amount Quoted
Amount to Invoice
Invoice Number
Completed By
Cost
Profit
What I want to know Is what is the best way/ how do I calculate either in a form or query the overall profit for each month?
Please help, the database is really coming along, apart from this is well entruely stuck on.
You want to find all rows matching a specific year / month, and add together all the profit entries for that month to get a total?
If so, try this :
select sum(profit) from Jobs where year = 2013 and month = 02
Or, if you want to retrieve this information for all months in one go, try this :
select year, month, sum(profit) from Jobs group by year, month