[fix] null lines error and remaining qty assign