Make object with Tax.

@param int|string $amount
@param \Duit\Concerns\Taxable $taxable

@return static
427476
public static function afterTax($amount, Taxable $taxable)
    {
        return static::beforeTax(
            $taxable->getAmountWithoutTax(static::asMoney($amount)), $taxable
        );
    }
668079
public function setRows(int $amount)
    {
        if (!$amount) {
            throw new InvalidArgumentException('Rows amount must be set');
        }

        if ($this->rows === $amount) {
            return $this;
        }

        if ($this->rows < $amount) {
            // Add rows
            for ($i = $amount - $this->rows; $i > 0; $i--) {
                $this->structure[] = $this->columns ? array_fill(0, $this->columns, $this->cell_example) : [];
            }
        } else {
            // Remove rows from the end
            $this->structure = \array_slice($this->structure, 0, $amount);
        }

        $this->rows = $amount;

        return $this;
    }
304193
public function output($amount = 1)
    {
        $collection = [];

        for ($i = 1; $i <= $amount; $i++) {
            $random = $this->generate();

            while (!$this->validate($collection, $random)) {
                $random = $this->generate();
            }

            array_push($collection, $random);
        }

        return $collection;
    }
457814
public function refund($amount, $originalTransactionReference, $clientReference = NULL, $comment = NULL, $description = NULL, $cardHolderName = NULL, $taxAmount = NULL)
	{
		$request = Request::createFromClient($this);

		$request->setTransactionType(Request::TRANSACTION_TYPE_REFUND)
		        ->setTotalAmount($amount)
		        ->setOriginalTransactionReference($originalTransactionReference)
		        ->setClientReference($clientReference)
		        ->setComment($comment)
		        ->setMerchantDescription($description)
		        ->setMerchantCardHolderName($cardHolderName)
		        ->setTaxAmount($taxAmount);

		return $request;
	}
1061504
public function authorize($amount = null)
    {
        $builder = new HpsCreditServiceAuthorizeBuilder($this);
        return $builder
            ->withAmount($amount)
            ->withCurrency('usd');
    }
1267505
public static function parse(string $amount)
    {
        $parser = new DecimalMoneyParser(new ISOCurrencies());

        return static::given(
            $parser->parse($amount, new Currency('MYR'))->getAmount()
        );
    }
1181811
public function increaseOffsetBy($amount)
    {
        if ($this->offset === null) {
            $this->offset = 0;
        }
        $this->offset += $amount;

        return $this;
    }
843746
public function filterByAmount($amount) {
        foreach ($this->_paymentMethod as $name => $class) {
            $amountRange = $class->getSupportedAmountRange();
            if (intval($amount) >= $amountRange["minimum"] &&
                    intval($amount) <= $amountRange["maximum"]) {
                
            } else
                unset($this->paymentMethods[$name]);
        }
        return $this;
    }
666485
private static function roundUp($amount)
    {
        $result = self::roundTowardsZero($amount);

        if (1 == bccomp($amount, '0', self::BCSCALE) && 0 != bccomp($amount, $result, self::BCSCALE)) {
            $result = bcadd($result, '1', self::BCSCALE);
        }

        return $result;
    }
37276
private function createMoney(int $amount = 0): ?Money
    {
        if (!$this->currency) {
            return null;
        }

        return DandomainFoundation\createMoney($this->currency->getIsoCodeAlpha(), $amount);
    }
38531
public function refund($amount = null)
    {
        return (new ManagementBuilder(TransactionType::REFUND))
            ->withPaymentMethod($this->transactionReference)
            ->withAmount($amount);
    }
1306274
final public function limit(int $amount = null)
    {
        $this->limitAmount = $amount === null ? null : $amount;

        return $this;
    }
367397
public function creditCardPartial($amount)
    {
        $data = new stdClass();
        $data->amount = $amount;

        return $this->execute($data);
    }
97069
public function charge($amount = null)
    {
        $builder = new HpsCreditServiceChargeBuilder($this);
        return $builder
            ->withAmount($amount)
            ->withCurrency('usd');
    }
203573
public function desaturate($amount)
    {
        if ($amount < 0 || $amount > 100) {
            throw new InvalidArgumentException('The given amount must be between 0 and 100');
        }
        $amount /= 100;
        $this->saturation -= $this->saturation * $amount;

        return $this;
    }
9403
public function setTax($tax)
    {
        NumericValidator::validate($tax, "Tax");
        $tax = Formatter::formatToPrice($tax, $this->getCurrency());
        $this->tax = $tax;
        return $this;
    }
376389
public function calculate($price, $unitTax, $quantity = 0)
    {
        $this->Tax = $unitTax * $quantity;
        $this->Total = $this->Tax + ($quantity * $price);

        return $this;
    }