mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 00:17:34 -05:00 
			
		
		
		
	Generates number
This commit is contained in:
		
							parent
							
								
									defbae832b
								
							
						
					
					
						commit
						21edcdf919
					
				@ -20,6 +20,8 @@ trait GeneratesNumberCounter
 | 
			
		||||
	{
 | 
			
		||||
 | 
			
		||||
		$counter = $this->getCounter($entity);
 | 
			
		||||
        $prefix = $this->getNumberPrefix($entityType);
 | 
			
		||||
 | 
			
		||||
		$check = false;
 | 
			
		||||
 | 
			
		||||
		do {
 | 
			
		||||
@ -87,6 +89,20 @@ trait GeneratesNumberCounter
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @param $entity
 | 
			
		||||
     *
 | 
			
		||||
     * @return string
 | 
			
		||||
     */
 | 
			
		||||
    public function getNumberPrefix($entity)
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        $field = $this->entityName($entity) . "_number_prefix";
 | 
			
		||||
 | 
			
		||||
        return $this->getSettingsByKey( $field )->{$field};
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	private function incrementCounter($entity)
 | 
			
		||||
	{
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user