ReceiptGenerator
        
        extends ReceiptGenerator
    
    
            
            in package
            
        
    
    
    
        
            Class created by Core/Base/PluginDeploy
Tags
Table of Contents
- MAX_RECEIPTS = 100
 - PARTIAL_AMOUNT_MULTIPLIER = 1.5
 - generate() : bool
 - update() : mixed
 - generateCustomerReceipts() : bool
 - generateSupplierReceipts() : bool
 - getOutstandingAmount() : float
 - isCero() : bool
 - Returns TRUE if $amount is cero.
 - newCustomerReceipt() : bool
 - newSupplierReceipt() : bool
 - toolBox() : ToolBox
 - updateCustomerReceipts() : bool
 - updateSupplierReceipts() : bool
 
Constants
MAX_RECEIPTS
    public
        mixed
    MAX_RECEIPTS
    = 100
        
        
    
PARTIAL_AMOUNT_MULTIPLIER
    public
        mixed
    PARTIAL_AMOUNT_MULTIPLIER
    = 1.5
        
        
    
Methods
generate()
    public
                    generate(FacturaCliente|FacturaProveedor $invoice, int $number) : bool
    
        Parameters
- $invoice : FacturaCliente|FacturaProveedor
 - $number : int
 
Return values
bool —update()
    public
                    update(FacturaCliente|FacturaProveedor &$invoice) : mixed
    
        Parameters
- $invoice : FacturaCliente|FacturaProveedor
 
Return values
mixed —generateCustomerReceipts()
    protected
                    generateCustomerReceipts(FacturaCliente $invoice, int $number) : bool
    
        Parameters
- $invoice : FacturaCliente
 - $number : int
 
Return values
bool —generateSupplierReceipts()
    protected
                    generateSupplierReceipts(FacturaProveedor $invoice, int $number) : bool
    
        Parameters
- $invoice : FacturaProveedor
 - $number : int
 
Return values
bool —getOutstandingAmount()
    protected
                    getOutstandingAmount(array<string|int, ReciboCliente>|array<string|int, ReciboProveedor> $receipts, float $amount) : float
    
        Parameters
- $receipts : array<string|int, ReciboCliente>|array<string|int, ReciboProveedor>
 - $amount : float
 
Return values
float —isCero()
Returns TRUE if $amount is cero.
    protected
                    isCero(float $amount) : bool
    
        Parameters
- $amount : float
 
Return values
bool —newCustomerReceipt()
    protected
                    newCustomerReceipt(FacturaCliente $invoice, int $number, float $amount) : bool
    
        Parameters
- $invoice : FacturaCliente
 - $number : int
 - $amount : float
 
Return values
bool —newSupplierReceipt()
    protected
                    newSupplierReceipt(FacturaProveedor $invoice, int $number, float $amount) : bool
    
        Parameters
- $invoice : FacturaProveedor
 - $number : int
 - $amount : float
 
Return values
bool —toolBox()
    protected
                    toolBox() : ToolBox
    
    
    
        Return values
ToolBox —updateCustomerReceipts()
    protected
                    updateCustomerReceipts(FacturaCliente $invoice) : bool
    
        Parameters
- $invoice : FacturaCliente
 
Return values
bool —updateSupplierReceipts()
    protected
                    updateSupplierReceipts(FacturaProveedor $invoice) : bool
    
        Parameters
- $invoice : FacturaProveedor