Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4699b274

Von Moritz Bunkus vor fast 8 Jahren hinzugefügt

  • ID 4699b274533502b138cb737f0d2dcad88e3624a2
  • Vorgänger 6531c2fd
  • Nachfolger 24097357

Belegvorlagen: employee_id bei Umwandlung aus Drafts beibehalten

Unterschiede anzeigen:

sql/Pg-upgrade2/convert_drafts_to_record_templates.pl
16 16
  my ($self) = @_;
17 17

  
18 18
  $self->{q_draft} = qq|
19
    SELECT description, form
19
    SELECT description, form, employee_id
20 20
    FROM drafts
21 21
    WHERE module = ?
22 22
|;
......
77 77
  $self->{h_draft}->execute('ar') || die $self->{h_draft}->errstr;
78 78

  
79 79
  while (my $draft_record = $self->{h_draft}->fetchrow_hashref) {
80
    my $draft         = YAML::Load($draft_record->{form});
81
    my $currency_id   = $self->{currency_ids_by_name}->{$draft->{currency}};
82
    my ($employee_id) = $draft->{employee_id} || (split m{--}, $draft->{employee})[1] || undef;
80
    my $draft       = YAML::Load($draft_record->{form});
81
    my $currency_id = $self->{currency_ids_by_name}->{$draft->{currency}};
82
    my $employee_id = $draft_record->{employee_id} || $draft->{employee_id} || (split m{--}, $draft->{employee})[1] || undef;
83 83

  
84 84
    next unless $currency_id;
85 85

  
......
154 154
  while (my $draft_record = $self->{h_draft}->fetchrow_hashref) {
155 155
    my $draft       = YAML::Load($draft_record->{form});
156 156
    my $currency_id = $self->{currency_ids_by_name}->{$draft->{currency}};
157
    my $employee_id = $draft_record->{employee_id} || $draft->{employee_id} || (split m{--}, $draft->{employee})[1] || undef;
157 158

  
158 159
    next unless $currency_id;
159 160

  
......
168 169
      $currency_id,
169 170
      $draft->{department_id}    || undef,
170 171
      $draft->{globalproject_id} || undef,
171
      undef,
172
      $employee_id,
172 173

  
173 174
      # taxincluded,   direct_debit, ob_transaction, cb_transaction,
174 175
      $draft->{taxincluded}   ? 1 : 0,
......
226 227
  $self->{h_draft}->execute('gl') || die $self->{h_draft}->errstr;
227 228

  
228 229
  while (my $draft_record = $self->{h_draft}->fetchrow_hashref) {
229
    my $draft = YAML::Load($draft_record->{form});
230
    my $draft       = YAML::Load($draft_record->{form});
231
    my $employee_id = $draft_record->{employee_id} || $draft->{employee_id} || (split m{--}, $draft->{employee})[1] || undef;
230 232

  
231 233
    my @values = (
232 234
      # template_name, template_type, customer_id, vendor_id,
......
239 241
      $self->{default_currency_id},
240 242
      $draft->{department_id} || undef,
241 243
      undef,
242
      undef,
244
      $employee_id,
243 245

  
244 246
      # taxincluded,   direct_debit, ob_transaction, cb_transaction,
245 247
      $draft->{taxincluded}    ? 1 : 0,

Auch abrufbar als: Unified diff