CreateInvoicesCommand
extends AbstractBaseCommand
in package
Class that can be used as Base for other commands It exposes functions to unify the look&feel
Table of Contents
- $description : string
- The command description
- $signature : string
- The command signature
- $silent : bool
- Suppress all info,error,warn and printWelcome output messages use `$this->line` instead to force writing output in silent mode
- __construct() : mixed
- Constructor, it will start a new batch to group all log items
- call() : int
- Call another console command.
- error() : void
- Print an <error>$string</error> message
- handle() : void
- info() : void
- Print an <info>$string</info> message
- warn() : void
- Print an <error>$string</error> message
- printWelcome() : bool
- Prints a Welcome message
- applyPromotion() : object
- getPromotionsEntries() : object
Properties
$description
The command description
protected
string
$description
= 'This command will create the invoice for the pending BillingEntries'
$signature
The command signature
protected
string
$signature
= 'bennu:crm:create-invoices {--Y|yes}'
$silent
Suppress all info,error,warn and printWelcome output messages use `$this->line` instead to force writing output in silent mode
protected
bool
$silent
= false
Methods
__construct()
Constructor, it will start a new batch to group all log items
public
__construct() : mixed
Return values
mixed —call()
Call another console command.
public
call( $command[, array<string|int, mixed> $arguments = [] ]) : int
Parameters
Return values
int —error()
Print an <error>$string</error> message
public
error( $string[, $verbosity = null ]) : void
Parameters
Return values
void —handle()
public
handle() : void
Return values
void —info()
Print an <info>$string</info> message
public
info( $string[, $verbosity = null ]) : void
Parameters
Return values
void —warn()
Print an <error>$string</error> message
public
warn( $string[, $verbosity = null ]) : void
Parameters
Return values
void —printWelcome()
Prints a Welcome message
protected
printWelcome([string|null $message = null ][, bool $assumeYes = false ]) : bool
Parameters
- $message : string|null = null
- $assumeYes : bool = false
Return values
bool —applyPromotion()
private
applyPromotion(Promotion $promotion, float $billableTotal, float $billableTotalWithPromotions) : object
Parameters
- $promotion : Promotion
- $billableTotal : float
- $billableTotalWithPromotions : float
Return values
object —getPromotionsEntries()
private
getPromotionsEntries(Customer $customer, float $billableTotal, array<string|int, mixed> &$promotionsUsages[, BillingEntry $billingEntry = null ]) : object
Parameters
- $customer : Customer
- $billableTotal : float
- $promotionsUsages : array<string|int, mixed>
- $billingEntry : BillingEntry = null