mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:07:32 -05:00 
			
		
		
		
	Recurring migration
This commit is contained in:
		
							parent
							
								
									9afd6c6fc2
								
							
						
					
					
						commit
						2384e3d3e8
					
				@ -460,7 +460,7 @@ trait GenerateMigrationResources
 | 
				
			|||||||
                'created_at' => $invoice->created_at ? $invoice->created_at->toDateString() : null,
 | 
					                'created_at' => $invoice->created_at ? $invoice->created_at->toDateString() : null,
 | 
				
			||||||
                'updated_at' => $invoice->updated_at ? $invoice->updated_at->toDateString() : null,
 | 
					                'updated_at' => $invoice->updated_at ? $invoice->updated_at->toDateString() : null,
 | 
				
			||||||
                'deleted_at' => $invoice->deleted_at ? $invoice->deleted_at->toDateString() : null,
 | 
					                'deleted_at' => $invoice->deleted_at ? $invoice->deleted_at->toDateString() : null,
 | 
				
			||||||
                'next_send_date' => $invoice->getNextSendDate()->format('Y-m-d'),
 | 
					                'next_send_date' => $this->getNextSendDateForMigration($invoice),
 | 
				
			||||||
                'frequency_id' => $this->transformFrequencyId($invoice),
 | 
					                'frequency_id' => $this->transformFrequencyId($invoice),
 | 
				
			||||||
                'due_date_days' => $this->transformDueDate($invoice),
 | 
					                'due_date_days' => $this->transformDueDate($invoice),
 | 
				
			||||||
                'remaining_cycles' => $this->getRemainingCycles($invoice),
 | 
					                'remaining_cycles' => $this->getRemainingCycles($invoice),
 | 
				
			||||||
@ -472,6 +472,16 @@ trait GenerateMigrationResources
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private function getNextSendDateForMigration($invoice)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        if($next_send_date = $invoice->getNextSendDate())
 | 
				
			||||||
 | 
					            return $next_send_date->format('Y-m-d');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Determine the number of remaining cycles */
 | 
					    /* Determine the number of remaining cycles */
 | 
				
			||||||
    private function getRemainingCycles($invoice)
 | 
					    private function getRemainingCycles($invoice)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user