priceMarkup 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -9
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 30e6422b5e9db4f74c9b1e8a20a48dc023491d90
|
|
4
|
+
data.tar.gz: 511ce7f1d995c9b231b93ca60bf5a3da075204c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cc23bd9fe2426d70abf453a84d1353504002e4b800d42e95040f9b1023cccb2e4e5aab2166ed20eb38007dd92b14d6faf3dbde5105277bb9830ac6c21ed26632
|
|
7
|
+
data.tar.gz: 25e0d078143dbc0b8b5bdc05e7c51753bad6d03b0506883c1fb3489577cef01c6947bf300e438a5f61b73ec820af59a1afb0b5deca8b1c676953e54a28cae87f
|
data/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Price Markup
|
|
2
|
+
[](http://badge.fury.io/rb/priceMarkup)
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
**priceMarkup** allows the selling price to be calculated from the cost price based on a markup value
|
|
4
5
|
|
|
5
|
-
The default markup is 0.25
|
|
6
|
+
The default markup is 0.25 (25%)
|
|
6
7
|
|
|
7
8
|
The number of figures after the decimal point may be specified.
|
|
8
|
-
|
|
9
9
|
The default is zero if the first argument is an integer but two otherwise.
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
@@ -25,17 +25,17 @@ Or install it yourself as:
|
|
|
25
25
|
## Usage
|
|
26
26
|
> **Dowstore.priceMarkup( *price*, *markup*, *decimal\_places*)**
|
|
27
27
|
|
|
28
|
-
> Dowstore.priceMarkup(100) => "125"
|
|
28
|
+
> `Dowstore.priceMarkup(100) => "125"`
|
|
29
29
|
|
|
30
|
-
> Dowstore.priceMarkup(100, 2) => "300"
|
|
30
|
+
> `Dowstore.priceMarkup(100, 2) => "300"`
|
|
31
31
|
|
|
32
|
-
> Dowstore.priceMarkup(100, 2, 3) => "300.000"
|
|
32
|
+
> `Dowstore.priceMarkup(100, 2, 3) => "300.000"`
|
|
33
33
|
|
|
34
|
-
> Dowstore.priceMarkup(100, 2.5556, 1) => "355.6"
|
|
34
|
+
> `Dowstore.priceMarkup(100, 2.5556, 1) => "355.6"`
|
|
35
35
|
|
|
36
|
-
> Dowstore.priceMarkup(100.75, 2.5, 4) => "352.6250"
|
|
36
|
+
> `Dowstore.priceMarkup(100.75, 2.5, 4) => "352.6250"`
|
|
37
37
|
|
|
38
|
-
> Dowstore.priceMarkup(100.75, 2.5, 0) => "353"
|
|
38
|
+
> `Dowstore.priceMarkup(100.75, 2.5, 0) => "353"`
|
|
39
39
|
|
|
40
40
|
## Contributing
|
|
41
41
|
|