doutongxuan1614
2014-11-24 11:01 阅读 17
已采纳

如何在Codeigniter中生成Code_products?

How to create invoice number as below required?

Invoice format DP1411-0001 it contain three piece.

  • DP = type of invoice
  • 14 = year of create invoice
  • 11 = month of creating invoice
  • 0001 = number of invoice that generate by invoice amount

Example

  • DP1411-0001
  • DP1411-0002
  • DP1411-0003
  • ...........
  • DP1411-000n

But I have not any idea or logic to create.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    drlnsli18864734 drlnsli18864734 2014-11-24 11:11

    Concat everything, When generating Invoice get the information about whether it is DP or something store it into some variable. Get the year and month and store it some variable and finally concat everything...

    if you want something else please be specific.

    点赞 评论 复制链接分享

相关推荐